zfsonlinux/zfs — pull request #2907 by dweeezil (2014-11-17 04:39:40+00:00)
Title: Don't prune non-existent snapshots for non-recursive streams

A send stream with properties contains an nvlist "fss" describing
the source snapshots and their properties. As of commit
057485504e3a4502c265813ab58e9ec8ffc2a3be, this list may not include
all the snapshots on the source. In particular, it only includes the
snapshots which actually are sent and, furthermore, it is only sent when
either "zfs send -p" or "zfs send -R" are used.

The snapshot pruning code enabled under "zfs receive -F" depends on a
complete fss[id[snaps]] list. If it's not complete, the filesystem can
be damaged at worst or, at best, left in it's renamed state (renamed to
"-recv--".

This commit suppresses the snapshot pruning for non-recursive streams
since they still include the complete list of snapshots in fss[id[snaps]].