]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Drop references when skipping dmu_send due to EXDEV
authorRyan Moeller <ryan@iXsystems.com>
Wed, 30 Sep 2020 20:19:49 +0000 (16:19 -0400)
committerGitHub <noreply@github.com>
Wed, 30 Sep 2020 20:19:49 +0000 (13:19 -0700)
commitc0bd2e0fe206791242d467b6f84789bf08c3a118
tree7da4b6764fde98a8b300c0a4c298eb7a2d7e6a96
parent68cdafdbb8c3515328cedd351b471e1bb918bd27
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
configure.ac
module/os/freebsd/zfs/kmod_core.c
module/zfs/dmu_send.c
tests/runfiles/common.run
tests/zfs-tests/cmd/Makefile.am
tests/zfs-tests/cmd/badsend/.gitignore [new file with mode: 0644]
tests/zfs-tests/cmd/badsend/Makefile.am [new file with mode: 0644]
tests/zfs-tests/cmd/badsend/badsend.c [new file with mode: 0644]
tests/zfs-tests/include/commands.cfg
tests/zfs-tests/tests/functional/rsend/Makefile.am
tests/zfs-tests/tests/functional/rsend/send_invalid.ksh [new file with mode: 0755]