HomeFreeBSD

Fail invalid incremental recursive send gracefully

Description

Fail invalid incremental recursive send gracefully

zfs send -R -i snap1 pool/ds@snap1 is an invalid invocation of zfs send
because the incremental source and target snapshots are the same. We
have an error message for this condition, but we don't make it there
because of a failed assert while iterating through the dataset's
snapshots.

Check for NULL to avoid the assert so we can make it to the error
message.

Test this form of invalid send invocation in rsend tests. Fix the
rsend_016_neg test while here: log_neg itself doesn't fail the test,
and writing to /dev/null is not supported on all Linux kernels.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11121
Closes #12533

Details

Provenance
freqlabsAuthored on Oct 8 2021, 6:14 PM
GitHub <noreply@github.com>Committed on Oct 8 2021, 6:14 PM
Parents
rG9d1407e8f248: Correct refcount_add in dmu_zfetch
Branches
Unknown
Tags
Unknown