fix for 6513 only works in hole punching case, not truncation
The problem is that dbuf_findbp will return ENOENT if the block it's
trying to find is beyond the end of the file. If that happens, we assume
there is no birth time, and so we lose that information when we write
out new blkptrs. We should teach dbuf_findbp to look for things that are
beyond the current end, but not beyond the absolute end of the file.
To verify, create a large file, truncate it to a short length, and then
write beyond the end. Check with zdb to make sure that there are no
holes with birth time zero (will appear as gaps).
Updated by Electric Monk about 4 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 7de35a3ed0c2e6d4256bd2fb05b48b3798aaf553 Author: Paul Dagnelie <email@example.com> Date: 2017-01-19T02:52:15.000Z 7740 fix for 6513 only works in hole punching case, not truncation Reviewed by: Steve Gonczi <firstname.lastname@example.org> Reviewed by: Matthew Ahrens <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>