Please sign in to comment.
Fix dnode_hold() freeing dnode behavior
Commit 4c5b89f 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 <firstname.lastname@example.org> Reviewed-by: Tom Caputi <email@example.com> Reviewed-by: Olaf Faaland <firstname.lastname@example.org> Signed-off-by: Brian Behlendorf <email@example.com> Closes #8172
- Loading branch information...