All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs-progs: Add check and repair for invalid inode generation
@ 2019-09-24  8:11 Qu Wenruo
  2019-09-24  8:11 ` [PATCH 1/3] btrfs-progs: check/lowmem: " Qu Wenruo
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Qu Wenruo @ 2019-09-24  8:11 UTC (permalink / raw)
  To: linux-btrfs

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

-- 
2.23.0


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-10-21 16:08 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24  8:11 [PATCH 0/3] btrfs-progs: Add check and repair for invalid inode generation Qu Wenruo
2019-09-24  8:11 ` [PATCH 1/3] btrfs-progs: check/lowmem: " Qu Wenruo
2019-09-30 11:36   ` Nikolay Borisov
2019-09-30 12:24     ` Qu Wenruo
2019-09-30 13:34       ` Nikolay Borisov
2019-09-30 14:05         ` Qu Wenruo
2019-09-24  8:11 ` [PATCH 2/3] btrfs-progs: check/original: " Qu Wenruo
2019-09-30  8:41   ` Nikolay Borisov
2019-09-30  9:00     ` Qu Wenruo
2019-09-24  8:11 ` [PATCH 3/3] btrfs-progs: fsck-tests: Add test image for invalid inode generation repair Qu Wenruo
2019-10-18 20:32 ` [PATCH 0/3] btrfs-progs: Add check and repair for invalid inode generation Ferry Toth
2019-10-18 23:50   ` Qu WenRuo
2019-10-19 16:24     ` Ferry Toth
2019-10-20  0:26       ` Qu Wenruo
2019-10-20  0:51         ` Qu Wenruo
2019-10-20 13:04           ` Ferry Toth
2019-10-20 13:15             ` Qu WenRuo
2019-10-20 13:29               ` Ferry Toth
2019-10-20 14:11                 ` Qu Wenruo
2019-10-20 14:24                   ` Ferry Toth
2019-10-21 16:01                     ` Ferry Toth
2019-10-20 11:50         ` Ferry Toth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.