Holes can lose birth time info if a block has a mix of birth times
As reported by https://github.com/zfsonlinux/zfs/issues/4996, there is yet another hole birth issue. In this one, if a block is entirely holes, but the birth times are not all the same, we lose that information by creating one hole with the current txg as its birth time.
The ZoL PR's fix approach is incorrect. Ultimately, the problem here is that when you truncate and write a file in the same transaction group, the dbuf for the indirect block will be zeroed out to deal with the truncation, and then written for the write. During this process, we will lose hole birth time information for any holes in the range. In the case where a dnode is being freed, we need to determine whether the block should be converted to a higher-level hole in the zio pipeline, and if so do it when the dnode is being synced out.
Updated by Electric Monk over 1 year ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit 738e2a3ce3b2579222d6855e7fe75b5bcfcddf8d Author: Paul Dagnelie <email@example.com> Date: 2018-06-19T19:28:21.000Z 9438 Holes can lose birth time info if a block has a mix of birth times Reviewed by: Matt Ahrens <firstname.lastname@example.org> Reviewed by: George Wilson <email@example.com> Approved by: Robert Mustacchi <firstname.lastname@example.org>