aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libzfs
diff options
context:
space:
mode:
authorCedric Maunoury <[email protected]>2021-02-24 18:48:58 +0100
committerGitHub <[email protected]>2021-02-24 09:48:58 -0800
commitb9c07ec71b205c034e63f34fa3546437ea766b3b (patch)
tree1a3f800327f72bc444ab00e6e877b17a5ec6d884 /lib/libzfs
parent9312e0fd1e162094ba2470408878879fa24eeaf7 (diff)
send_iterate_snap : doall send without fromsnap
The behavior of a NULL fromsnap was inadvertently changed for a doall send when the send/recv logic in libzfs was updated. Restore the previous behavior by correcting send_iterate_snap() to include all the snapshots in the nvlist for this case. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Cedric Maunoury <[email protected]> Closes #11608
Diffstat (limited to 'lib/libzfs')
-rw-r--r--lib/libzfs/libzfs_sendrecv.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c
index 62a942644..1e3a0bf56 100644
--- a/lib/libzfs/libzfs_sendrecv.c
+++ b/lib/libzfs/libzfs_sendrecv.c
@@ -321,6 +321,15 @@ send_iterate_snap(zfs_handle_t *zhp, void *arg)
}
if (!sd->recursive) {
+
+ /*
+ * To allow a doall stream to work properly
+ * with a NULL fromsnap
+ */
+ if (sd->doall && sd->fromsnap == NULL && !sd->seenfrom) {
+ sd->seenfrom = B_TRUE;
+ }
+
if (!sd->seenfrom && isfromsnap) {
sd->seenfrom = B_TRUE;
zfs_close(zhp);