diff options
author | Cedric Maunoury <[email protected]> | 2021-02-24 18:48:58 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2021-03-05 12:54:39 -0800 |
commit | db9b29895e66c8e5787e47a7dbbe6d9276d2dd7d (patch) | |
tree | d4781213b57d80419a65570d3be5ccecf8f7cbe1 /lib | |
parent | 4d4dd76f0f8e8e5b42a2bdb9ba730e558574e2ad (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')
-rw-r--r-- | lib/libzfs/libzfs_sendrecv.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libzfs/libzfs_sendrecv.c b/lib/libzfs/libzfs_sendrecv.c index 3de7d7d9c..2f39cc246 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); |