From 5dbf8b4edd5a60b0d043b09aa168e8be1fb30647 Mon Sep 17 00:00:00 2001 From: Tom Caputi Date: Wed, 27 Mar 2019 14:30:48 -0400 Subject: Fix issues with truncated files in raw sends This patch fixes a few issues with raw receives involving truncated files: * dnode_reallocate() now calls dnode_set_blksz() instead of dnode_setdblksz(). This ensures that any remaining dbufs with blkid 0 are resized along with their containing dnode upon reallocation. * One of the calls to dmu_free_long_range() in receive_object() needs to check that the object it is about to free some contents or hasn't been completely removed already by a previous call to dmu_free_long_object() in the same function. * The same call to dmu_free_long_range() in the previous point needs to ensure it uses the object's current block size and not the new block size. This ensures the blocks of the object that are supposed to be freed are completely removed and not simply partially zeroed out. This patch also adds handling for DRR_OBJECT_RANGE records to dprintf_drr() for debugging purposes. Reviewed-by: Matt Ahrens Reviewed-by: Brian Behlendorf Signed-off-by: Tom Caputi Closes #7378 Closes #8528 --- tests/runfiles/linux.run | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/runfiles/linux.run') diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run index 9537798a9..211daaf27 100644 --- a/tests/runfiles/linux.run +++ b/tests/runfiles/linux.run @@ -792,7 +792,8 @@ tests = ['rsend_001_pos', 'rsend_002_pos', 'rsend_003_pos', 'rsend_004_pos', 'send-c_lz4_disabled', 'send-c_recv_lz4_disabled', 'send-c_mixed_compression', 'send-c_stream_size_estimate', 'send-cD', 'send-c_embedded_blocks', 'send-c_resume', 'send-cpL_varied_recsize', - 'send-c_recv_dedup', 'send_encrypted_files', 'send_encrypted_heirarchy', + 'send-c_recv_dedup', 'send_encrypted_files', + 'send_encrypted_truncated_files', 'send_encrypted_heirarchy', 'send_encrypted_props', 'send_freeobjects', 'send_realloc_dnode_size', 'send_holds', 'send_hole_birth', 'send_mixed_raw', 'send-wDR_encrypted_zvol'] -- cgit v1.2.3