From e6107668385044718b0a73330ed6423650806473 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Tue, 9 May 2023 22:32:30 -0700 Subject: [PATCH] Make sure we are not trying to clone a spill block. Reviewed-by: Brian Behlendorf Signed-off-by: Pawel Jakub Dawidek Closes #14825 --- module/zfs/dmu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c index 97379dfc1c..8a13b8f410 100644 --- a/module/zfs/dmu.c +++ b/module/zfs/dmu.c @@ -2279,6 +2279,7 @@ dmu_brt_clone(objset_t *os, uint64_t object, uint64_t offset, uint64_t length, ASSERT0(db->db_level); ASSERT(db->db_blkid != DMU_BONUS_BLKID); + ASSERT(db->db_blkid != DMU_SPILL_BLKID); if (!BP_IS_HOLE(bp) && BP_GET_LSIZE(bp) != dbuf->db_size) { error = SET_ERROR(EXDEV); @@ -2293,6 +2294,7 @@ dmu_brt_clone(objset_t *os, uint64_t object, uint64_t offset, uint64_t length, ASSERT0(db->db_level); ASSERT(db->db_blkid != DMU_BONUS_BLKID); + ASSERT(db->db_blkid != DMU_SPILL_BLKID); ASSERT(BP_IS_HOLE(bp) || dbuf->db_size == BP_GET_LSIZE(bp)); dmu_buf_will_clone(dbuf, tx);