Drop references when skipping dmu_send due to EXDEV

When an invalid incremental send is requested where the "to" ds is
before the "from" ds, make sure to drop the reference to the pool
and the dataset before returning the error.

Add an assert on FreeBSD to make sure we don't hold any locks after
returning from an ioctl.

Add some test coverage.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10919
This commit is contained in:
Ryan Moeller
2020-09-30 16:19:49 -04:00
committed by Brian Behlendorf
parent 83b5a22d86
commit e58dee8cae
11 changed files with 216 additions and 7 deletions
+2 -1
View File
@@ -190,7 +190,8 @@ export ZFS_FILES='zdb
zstreamdump
zfs_ids_to_path'
export ZFSTEST_FILES='btree_test
export ZFSTEST_FILES='badsend
btree_test
chg_usr_exec
devname2devid
dir_rd_update