Skip to content

Commit

Permalink
BRT: Clear bv_entcount_dirty on destroy
Browse files Browse the repository at this point in the history
This fixes assertion in brt_sync_table() on debug builds when last
cloned block on the vdev is freed and bv_meta_dirty is cleared,
while bv_entcount_dirty is not.  Should not matter in production.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored by:	iXsystems, Inc.
Closes openzfs#16791
  • Loading branch information
amotin authored and behlendorf committed Nov 21, 2024
1 parent 1a5414b commit c165daa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions module/zfs/brt.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ brt_vdev_destroy(spa_t *spa, brt_vdev_t *brtvd, dmu_tx_t *tx)
BRT_DEBUG("MOS BRT VDEV destroyed, object=%llu",
(u_longlong_t)brtvd->bv_mos_brtvdev);
brtvd->bv_mos_brtvdev = 0;
brtvd->bv_entcount_dirty = FALSE;

snprintf(name, sizeof (name), "%s%llu", BRT_OBJECT_VDEV_PREFIX,
(u_longlong_t)brtvd->bv_vdevid);
Expand Down

0 comments on commit c165daa

Please sign in to comment.