HomeFreeBSD

Produce a full snapshot list for zfs send -p

Description

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

Details

Provenance
Tim Chase <tim@chase2k.com>Authored on Nov 17 2014, 4:27 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Feb 10 2015, 12:43 AM
Parents
rG7fc8c33ede10: Don't read space maps during import for readonly pools
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGe890dd85a752: Produce a full snapshot list for zfs send -p (authored by Tim Chase <tim@chase2k.com>).Feb 10 2015, 12:43 AM