mirror_zfs/module
Tom Caputi 5dbf8b4edd 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 <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7378 
Closes #8528
2019-03-27 11:30:48 -07:00
..
avl Update build system and packaging 2018-05-29 16:00:33 -07:00
icp Fedora 28: Fix misc bounds check compiler warnings 2018-08-26 12:55:44 -07:00
lua Update build system and packaging 2018-05-29 16:00:33 -07:00
nvpair OpenZFS 9914 - NV_UNIQUE_NAME_TYPE broken after 9580 2019-03-13 11:16:30 -07:00
spl Linux 5.1 compat: get_ds() removed 2019-03-07 14:44:23 -08:00
unicode Update build system and packaging 2018-05-29 16:00:33 -07:00
zcommon Detect and prevent mixed raw and non-raw sends 2019-03-13 11:00:43 -07:00
zfs Fix issues with truncated files in raw sends 2019-03-27 11:30:48 -07:00
.gitignore Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
Makefile.in Linux 5.0 compat: Fix SUBDIRs 2019-01-28 10:11:45 -08:00