]> git.proxmox.com Git - mirror_zfs.git/commit
make DMU_OT_IS_METADATA and DMU_OT_IS_ENCRYPTED return B_TRUE or B_FALSE
authorChristian Schwarz <me@cschwarz.com>
Thu, 8 Sep 2022 00:04:15 +0000 (02:04 +0200)
committerTony Hutter <hutter2@llnl.gov>
Thu, 15 Sep 2022 23:58:35 +0000 (16:58 -0700)
commitcde04badd1d76e3af050fb0232d06af8550e8b8b
tree8c95689503a7fffb1a53e417cc24b1574c4e7666
parent3f7c174b50a3430adf68ae2f91146cc4206c5e0c
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
include/sys/dmu.h