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 over 2 years ago
- % Done changed from 0 to 100
- Status changed from New to Closed
commit 7de35a3ed0c2e6d4256bd2fb05b48b3798aaf553 Author: Paul Dagnelie <firstname.lastname@example.org> Date: 2017-01-19T02:52:15.000Z 7740 fix for 6513 only works in hole punching case, not truncation Reviewed by: Steve Gonczi <email@example.com> Reviewed by: Matthew Ahrens <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>