]> git.proxmox.com Git - mirror_zfs.git/commit - tests/zfs-tests/tests/functional/rsend/rsend.kshlib
Fix issues with truncated files in raw sends
authorTom Caputi <tcaputi@datto.com>
Wed, 10 Apr 2019 17:17:36 +0000 (10:17 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 15 Apr 2019 22:28:48 +0000 (15:28 -0700)
commitc2c6eadf29c8ab46f6c9fdc68688e65785d26b4b
tree2d77c42f2ca73214ad5fb4cd94de8d0cedef2cfb
parent83472fabe5600695fdb07a3f158a9352cc5bf3af
Fix issues with truncated files in raw sends

When receiving a raw send stream only reallocated objects
whose contents were not freed by the standard indicators
should call dmu_free_long_range().

Furthermore, if calling dmu_free_long_range() is required
then the objects current block size must be used and not
the new block size.

Two additional test cases were added to provided realistic
test coverage for processing reallocated objects which are
part of a raw receive.

Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8528
Closes #8607
module/zfs/dmu_recv.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/rsend/Makefile.am
tests/zfs-tests/tests/functional/rsend/rsend.kshlib
tests/zfs-tests/tests/functional/rsend/send_encrypted_files.ksh
tests/zfs-tests/tests/functional/rsend/send_encrypted_truncated_files.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/rsend/send_realloc_encrypted_files.ksh [new file with mode: 0755]