HomeFreeBSD

BRT: Fix holes cloning.

Description

BRT: Fix holes cloning.

  • When reading L0 block pointers handle buffers without ones and

without dirty records as a holes. Those appear when dnode size
was increased, but the end was never written, so there are no new
indirection levels to store the pointers. It makes no sense to
return EAGAIN here, since sync won't create new indirection levels
until there will be actual writes.

  • When cloning blocks set destination hole logical birth time

to the current TXG. Otherwise if we are cloning over existing
data, newly created holes may not be properly replicated later.
Use BP_SET_BIRTH() when possible to not replicate its logic.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #15994
Closes #16007

Details

Provenance
mavAuthored on Mar 18 2024, 6:19 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 27 2024, 9:45 PM
Parents
rG8cd8ccca5383: BRT: Skip getting length in brt_entry_lookup()
Branches
Unknown
Tags
Unknown