freebsd-dev/module
Brian Behlendorf 78e2139467
Fix dnode_hold() freeing dnode behavior
Commit 4c5b89f59 refactored dnode_hold() and in the process
accidentally introduced a slight change in behavior which was
not intended.  The required behavior is that once the ZPL,
or other consumer, declares its intent to free a dnode then
dnode_hold() should immediately start failing.  This updated
code wouldn't return the failure until after it was freed.

When DNODE_MUST_BE_ALLOCATED is set it must return ENOENT, and
when DNODE_MUST_BE_FREE is set it must return EEXIST;

This issue was uncovered by ztest_remap() which attempted
to remap a freeing object which should have been skipped as
described by the comment in dmu_objset_remap_indirects_impl().

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8172
2018-12-05 09:29:33 -08: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 Add new fnvlist_lookup_* functions 2018-10-03 15:30:55 -07:00
spl Create /proc/sys/kernel/spl/gitrev with git hash 2018-10-08 21:57:02 -07:00
unicode Update build system and packaging 2018-05-29 16:00:33 -07:00
zcommon Fix 'zpool list -v' alignment 2018-12-04 10:17:54 -08:00
zfs Fix dnode_hold() freeing dnode behavior 2018-12-05 09:29:33 -08:00
.gitignore Prepare SPL repo to merge with ZFS repo 2018-05-29 14:51:39 -07:00
Makefile.in Update build system and packaging 2018-05-29 16:00:33 -07:00