diff options
author | Cedric Maunoury <[email protected]> | 2021-02-24 18:48:58 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-02-24 09:48:58 -0800 |
commit | b9c07ec71b205c034e63f34fa3546437ea766b3b (patch) | |
tree | 1a3f800327f72bc444ab00e6e877b17a5ec6d884 /lib/libzfs | |
parent | 9312e0fd1e162094ba2470408878879fa24eeaf7 (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.c | 9 |
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); |