]> git.proxmox.com Git - mirror_zfs.git/commit
BRT: Fix holes cloning.
authorAlexander Motin <mav@FreeBSD.org>
Mon, 18 Mar 2024 18:19:53 +0000 (14:19 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 27 Mar 2024 21:45:27 +0000 (14:45 -0700)
commita89d209bb60c3f32881da7624bd01d28023da4f4
tree5ead860a25d8347074151a47b3d68a2230e42515
parent8cd8ccca5383dcdd9bf55d4d22921a6b43b4ebe1
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
module/zfs/dmu.c