HomeFreeBSD

Block remap for cloned blocks on device removal

Description

Block remap for cloned blocks on device removal

When after device removal we handle block pointers remap, skip blocks
that might be cloned. BRTs are indexed by vdev id and offset from
block pointer's DVA[0]. So if we start addressing the same block by
some different DVA, we won't get the proper reference counter. As
result, we might either remap the block twice, that may result in
assertion during indirect mapping condense, or free it prematurely,
that may result in data overwrite, or free it twice, that may result
in assertion in spacemap code.

Reviewed-by: Ameer Hamza <ahamza@ixsystems.com>
Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15604
Closes #17180

Details

Provenance
mavAuthored on Mar 26 2025, 11:45 PM
GitHub <noreply@github.com>Committed on Mar 26 2025, 11:45 PM
Parents
rG50d87fed6a3a: runners: Fix tarball build for zfs-qemu-packages workflow (#17158)
Branches
Unknown
Tags
Unknown