mirror_zfs/cmd
Tom Caputi 047116ac76 Raw sends must be able to decrease nlevels
Currently, when a raw zfs send file includes a DRR_OBJECT record
that would decrease the number of levels of an existing object,
the object is reallocated with dmu_object_reclaim() which
creates the new dnode using the old object's nlevels. For non-raw
sends this doesn't really matter, but raw sends require that
nlevels on the receive side match that of the send side so that
the checksum-of-MAC tree can be properly maintained. This patch
corrects the issue by freeing the object completely before
allocating it again in this case.

This patch also corrects several issues with dnode_hold_impl()
and related functions that prevented dnodes (particularly
multi-slot dnodes) from being reallocated properly due to
the fact that existing dnodes were not being fully cleaned up
when they were freed.

This patch adds a test to make sure that zfs recv functions
properly with incremental streams containing dnodes of different
sizes.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6821
Closes #6864
2018-02-02 11:43:11 -08:00
..
arc_summary Handle broken pipes in arc_summary 2017-12-19 13:19:24 -08:00
arcstat arcstat: flush stdout / outfile after each line 2017-10-26 12:18:49 -07:00
dbufstat Add dbuf hash and dbuf cache kstats 2018-01-29 10:24:52 -08:00
fsck_zfs Add /sbin/fsck.zfs helper 2013-01-09 16:54:58 -08:00
mount_zfs Honor --with-mounthelperdir where applicable 2017-12-17 14:14:07 -08:00
raidz_test Support -fsanitize=address with --enable-asan 2018-01-10 10:49:27 -08:00
vdev_id vdev_id: new slot type ses 2017-12-20 09:42:07 -08:00
zdb Fix style issues in man pages and commands help 2018-01-29 15:05:03 -08:00
zed Fix shellcheck v0.4.6 warnings 2018-01-17 10:17:16 -08:00
zfs Encryption Stability and On-Disk Format Fixes 2018-02-02 11:37:16 -08:00
zgenhostid Add zgenhostid utility script 2017-07-25 13:22:03 -04:00
zhack zhack: fix getopt return type 2018-01-09 11:14:45 -08:00
zinject Add corruption failure option to zinject(8) 2017-08-14 15:17:15 -07:00
zpool Encryption Stability and On-Disk Format Fixes 2018-02-02 11:37:16 -08:00
zstreamdump Encryption Stability and On-Disk Format Fixes 2018-02-02 11:37:16 -08:00
ztest Raw sends must be able to decrease nlevels 2018-02-02 11:43:11 -08:00
zvol_id OpenZFS 6314 - buffer overflow in dsl_dataset_name 2016-06-28 13:47:03 -07:00
Makefile.am Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00