HomeFreeBSD

make DMU_OT_IS_METADATA and DMU_OT_IS_ENCRYPTED return B_TRUE or B_FALSE

Description

make DMU_OT_IS_METADATA and DMU_OT_IS_ENCRYPTED return B_TRUE or B_FALSE

Without this patch, the

ASSERT3U(dbuf_is_metadata(db), ==, arc_is_metadata(buf));

at the beginning of dbuf_assign_arcbuf can panic
if the object type is a DMU_OT_NEWTYPE that has
DMU_OT_METADATA set.

While we're at it, fix DMU_OT_IS_ENCRYPTED as well.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Christian Schwarz <christian.schwarz@nutanix.com>
Closes #13842

Details

Provenance
me_cschwarz.comAuthored on Sep 8 2022, 12:04 AM
Tony Hutter <hutter2@llnl.gov>Committed on Sep 15 2022, 11:58 PM
Parents
rG3f7c174b50a3: vdev_draid_lookup_map() should not iterate outside draid_maps
Branches
Unknown
Tags
Unknown