mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
zfs_receive_one: Check for the more likely error first
If zfs_receive_one() gets back EINVAL, check for the more likely case, embedded block pointers + encryption and return that error, before falling back to the less likely case, a resumable stream when the kernel has not been upgraded to support resume. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Allan Jude <allan@klarasystems.com> Sponsored-by: rsync.net Sponsored-by: Klara Inc. Closes #14379
This commit is contained in:
parent
856cefcd1c
commit
63267f7f77
@ -5117,14 +5117,14 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
|
||||
*cp = '@';
|
||||
break;
|
||||
case EINVAL:
|
||||
if (flags->resumable) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"kernel modules must be upgraded to "
|
||||
"receive this stream."));
|
||||
} else if (embedded && !raw) {
|
||||
if (embedded && !raw) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"incompatible embedded data stream "
|
||||
"feature with encrypted receive."));
|
||||
} else if (flags->resumable) {
|
||||
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
|
||||
"kernel modules must be upgraded to "
|
||||
"receive this stream."));
|
||||
}
|
||||
(void) zfs_error(hdl, EZFS_BADSTREAM, errbuf);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user