Message ID | cover.1714640642.git.wqu@suse.com (mailing list archive) |
---|---|
Headers | show |
Series | btrfs-progs: check: detect and repair ram_bytes mismatch for non-compressed data extents | expand |
On Thu, May 02, 2024 at 06:37:52PM +0930, Qu Wenruo wrote: > There are at least one kernel bug that makes on-disk > btrfs_file_extent_item::ram_bytes incorrect for non-compressed non-hole > data extents. > > Thankfully kernel just doesn't care ram_bytes for non-compressed extents > at all, so it doesn't lead to any data corruption or whatever, and this > is really just a minor problem. > > But for the sake of consistency and to follow the on-disk format, we > should still detect and repair such problems. > > This patchset would implement detection and repair for both lowmem and > original mode, and a new hand crafted test case for it. > > The reason why the test case is still handle crafted is, we do not have > the btrfs-corrupt-block support for corrupting ram_bytes to a specific > value yet. > > I'd prefer to do the binary image migration to script in a dedicated > patchset in the future. The crafted binary images are ok for now, I've verified it by restoring, did tree dump and check. There's an issue tracking the other images audit, https://github.com/kdave/btrfs-progs/issues/772, I did only a quick pass but a tool that will do the restore/check and maybe some other steps will be added to the repository. Patches added to devel, thanks.