btrfs-progs: check: properly fix missing INODE_REF cases
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs-progs: check/original: add dedicated missing INODE_REF repaircheck/ | +51 | 0 replies | |
| 2/3 | btrfs-progs: check/lowmem: fix INODE_REF repaircheck/ | +11 | 0 replies | |
| 3/3 | btrfs-progs: fsck-tests: add a test case for repairing missing INODE_REFtests/ tests/ | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] btrfs-progs: check: properly fix missing INODE_REF cases
This is inspired by a recent corruption report that an INODE_REF key hits a bitflip and becomes UNKNOWN.8 key.
That cause missing INODE_REF, and unfortunately neither original nor lowmem mode can properly handle it.
For the original mode it just completely lacks the handling for such case, thus fallback to delete the good DIR_INDEX, making things worse.
For the lowmem mode, although it is trying to keep the good DIR_INDEX/DIR_ITEM, it doesn't handle index number search, thus using the default (-1) as index, causing incorrect new link to be added.
Fix both modes, and add a new test case for it.
Qu Wenruo (3):
btrfs-progs: check/original: add dedicated missing INODE_REF repair
btrfs-progs: check/lowmem: fix INODE_REF repair
btrfs-progs: fsck-tests: add a test case for repairing missing
INODE_REF
check/main.c | 51 ++++++++++++++++++ check/mode-lowmem.c | 11 ++++ .../070-missing-inode-ref/.lowmem_repairable | 0 .../070-missing-inode-ref/default.img.xz | Bin 0 -> 2092 bytes 4 files changed, 62 insertions(+) create mode 100644 tests/fsck-tests/070-missing-inode-ref/.lowmem_repairable create mode 100644 tests/fsck-tests/070-missing-inode-ref/default.img.xz
--
2.52.0