btrfs-progs: Add check and repair for invalid inode generation
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 18 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs-progs: check/lowmem: Add check and repair for invalid inode generationcheck/ | +76 | 4 replies | |
| 2/3 | btrfs-progs: check/original: Add check and repair for invalid inode generationcheck/ check/ | +50 | 2 replies | |
| 3/3 | btrfs-progs: fsck-tests: Add test image for invalid inode generation repairtests/ tests/ | +0 | 0 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by.
| Patch | Nikolay Borisov |
|---|---|
| 1/3 | T-b R-b |
| 2/3 | R-b T-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] btrfs-progs: Add check and repair for invalid inode generation
We have at least two user reports about bad inode generation makes kernel reject the fs.
According to the creation time, the inode is created by some 2014 kernel.
And the generation member of INODE_ITEM is not updated (unlike the transid member) so the error persists until latest tree-checker detects.
Even the situation can be fixed by reverting back to older kernel and copying the offending dir/file to another inode and delete the offending one, it still should be done by btrfs-progs.
This patchset adds such check and repair ability to btrfs-check, with a simple test image.
Qu Wenruo (3):
btrfs-progs: check/lowmem: Add check and repair for invalid inode
generation
btrfs-progs: check/original: Add check and repair for invalid inode
generation
btrfs-progs: fsck-tests: Add test image for invalid inode generation
repair
check/main.c | 50 +++++++++++- check/mode-lowmem.c | 76 ++++++++++++++++++ check/mode-original.h | 1 + .../.lowmem_repairable | 0 .../bad_inode_geneartion.img.xz | Bin 0 -> 2012 bytes 5 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 tests/fsck-tests/043-bad-inode-generation/.lowmem_repairable create mode 100644 tests/fsck-tests/043-bad-inode-generation/bad_inode_geneartion.img.xz
Signature · 1 line
2.23.0