]> granicus.if.org Git - zfs/commit
Produce a full snapshot list for zfs send -p
authorTim Chase <tim@chase2k.com>
Mon, 17 Nov 2014 04:27:58 +0000 (22:27 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 10 Feb 2015 00:43:17 +0000 (16:43 -0800)
commite890dd85a7522730ad46daf68150aafd3952d0c1
tree0d7674084ebd01c88f8e3659cf647ddfc46a133f
parent7fc8c33ede10f7104ca0e91d690d3ebb5236887b
Produce a full snapshot list for zfs send -p

In order to accelerate zfs receive operations in the face of many
property-containing snapshots, commit 0574855 changed the header nvlist
("fss") of a send stream to exclude snapshots which aren't part of the
stream.  This, however, would cause zfs receive -F to erroneously remove
snapshots; it would remove any snapshot which wasn't listed in the header
nvlist.

This patch restores the full list of snapshots in fss[<id>[snaps]] but
still suppresses the properties of non-sent snapshots and also removes a
consistency check in which an error is raised if a listed snapshot does
not have any properties in fss[<id>[snapprops]].

The 0574855 commit also introduced a bug in which zfs send -p of a
complete stream (zfs send -p pool/fs@snap) would exclude the snapshot
properties in fss[<id>[snapprops]].  This patch detects the last snapshot
in a series when no "from" snapshot has been specified and includes its
properties.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2907
lib/libzfs/libzfs_sendrecv.c