From 9f2cbea1dc3ac96da4ef916ba60a6ce43f6bc50a Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Tue, 23 Sep 2025 19:09:37 -0400 Subject: [PATCH] zdb: Fix asize overflow in verify_livelist_allocs() Spacemap entry might be too big to fit into a block pointer ashift. We hit an assertion trying to run `zdb -bvy` on a large pool. But it seems the code does not really need size there, since we only need to search for a range of offsets, so setting it to zero should just make btree return position just before the first entry. I suspect the previous code could actually miss the first entry due to this if its size was smaller. Reviewed-by: Brian Behlendorf Reviewed-by: Igor Kozhukhov Signed-off-by: Alexander Motin Closes #17764 --- cmd/zdb/zdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c index 8685109db..843bedf48 100644 --- a/cmd/zdb/zdb.c +++ b/cmd/zdb/zdb.c @@ -381,7 +381,7 @@ verify_livelist_allocs(metaslab_verify_t *mv, uint64_t txg, sublivelist_verify_block_t svb = {{{0}}}; DVA_SET_VDEV(&svb.svb_dva, mv->mv_vdid); DVA_SET_OFFSET(&svb.svb_dva, offset); - DVA_SET_ASIZE(&svb.svb_dva, size); + DVA_SET_ASIZE(&svb.svb_dva, 0); zfs_btree_index_t where; uint64_t end_offset = offset + size;