aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2020-10-06 15:17:41 +0000
committerGlen Barber <gjb@FreeBSD.org>2020-10-06 15:17:41 +0000
commitf89b6bcc3da8c1a9b85541c571d268d9f8f95cf0 (patch)
treef6210fff544f0fc4ea9b0b3071df4e2d0070e820
parentf4d391bd542adf0d4c21248d88c2b1e439955e40 (diff)
downloadsrc-f89b6bcc3da8c1a9b85541c571d268d9f8f95cf0.tar.gz
src-f89b6bcc3da8c1a9b85541c571d268d9f8f95cf0.zip
MFS12 r366180, r366341:
r366180 (asomers): Fix resuming receive stream to dataset with mounted clone r366341 (asomers): Fix "zfs receive" of interrupted stream without "-F" Approved by: re (kib) Sponsored by: Rubicon Communications, LLC (netgate.com)
Notes
Notes: svn path=/releng/12.2/; revision=366490
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
index 55556d7b037d..bfb7f3923cfc 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
@@ -3138,7 +3138,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
char prop_errbuf[1024];
const char *chopprefix;
boolean_t newfs = B_FALSE;
- boolean_t stream_wantsnewfs;
+ boolean_t stream_wantsnewfs, stream_resumingnewfs;
uint64_t parent_snapguid = 0;
prop_changelist_t *clp = NULL;
nvlist_t *snapprops_nvlist = NULL;
@@ -3302,6 +3302,8 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
DMU_BACKUP_FEATURE_RESUMING;
stream_wantsnewfs = (drrb->drr_fromguid == 0 ||
(drrb->drr_flags & DRR_FLAG_CLONE) || originsnap) && !resuming;
+ stream_resumingnewfs = (drrb->drr_fromguid == 0 ||
+ (drrb->drr_flags & DRR_FLAG_CLONE) || originsnap) && resuming;
if (stream_wantsnewfs) {
/*
@@ -3433,7 +3435,7 @@ zfs_receive_one(libzfs_handle_t *hdl, int infd, const char *tosnap,
}
if (!flags->dryrun && zhp->zfs_type == ZFS_TYPE_FILESYSTEM &&
- (stream_wantsnewfs || resuming)) {
+ (stream_wantsnewfs || stream_resumingnewfs)) {
/* We can't do online recv in this case */
clp = changelist_gather(zhp, ZFS_PROP_NAME, 0, 0);
if (clp == NULL) {