Fix btrfs check handling of missing file extents
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 0 repliesNew
- v12 patches 2 repliesSuperseded
Changes in v2 from the cover letter
- While running full xfstests with the new progs I noticed failures for tests that should have been fine. Turns out our check will not wander down shared blocks, instead it'll merge inode records, which makes setting the rec->extent_start to key.offset very important. So instead fix the problem by checking for the start gap once we're done doing all the merging.
- Added a third patch to make the hole error message actually correct when we have a gap at the beginning.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs-progs: fix check to catch gaps at the start of the filecheck/ | +2 | 0 replies | |
| 2/3 | btrfs-progs: fix lowmem check's handling of holescheck/ | +6 | 0 replies | |
| 3/3 | btrfs-progs: fix hole error output in fsckcheck/ | +14 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH 0/3][v2] Fix btrfs check handling of missing file extents
v1->v2:
- While running full xfstests with the new progs I noticed failures for tests that should have been fine. Turns out our check will not wander down shared blocks, instead it'll merge inode records, which makes setting the rec->extent_start to key.offset very important. So instead fix the problem by checking for the start gap once we're done doing all the merging.
- Added a third patch to make the hole error message actually correct when we have a gap at the beginning.
--------------- Original message ------------------
While adding an xfstest for the missing file extent problem I fixed with the series
btrfs: fix hole corruption issue with !NO_HOLES
I was failing to fail my test without my patches, despite the file system being actually wrong.
It turns out because the normal check mode sets its expected start to the first file extent it finds, instead of 0. This means it misses any gaps between 0 and the first file extent item in the inode.
The lowmem check does not have this issue, instead it doesn't take into account the isize of the inode, so improperly fails when we have a gap but that is outside of the isize. I fixed this as well.
With these patches we're able to properly find another set of corruptions, and now my xfstest acts sanely. Thanks,
Josef