mbox series

[0/2] btrfs-progs: check: report deprecated inode cache as errors

Message ID cover.1726130115.git.wqu@suse.com (mailing list archive)
Headers show
Series btrfs-progs: check: report deprecated inode cache as errors | expand

Message

Qu Wenruo Sept. 12, 2024, 8:39 a.m. UTC
There are two reports that inode cache is causing kernel to reject those
data backrefs.

It turns out the long to be deprecated inode cache is biting us
unexpectedly.
(And the design of those special inodes has no intention to properly
fill its members like mode and transid correctly).

However the original mode btrfs check is not updated to detect them, in
fact there are special hacks to not report them as errors.
Meanwhile the lowmem mode immediately picks them as errors from day one.

The first patch fixes the original mode to report inode cache as error,
and add extra messages on how to properly fix the problem using 'btrfs
rescue clear-ino-cache'.

The second patch is a new test case for both modes of btrfs check.

Qu Wenruo (2):
  btrfs-progs: check: detect deprecated inode cache
  btrfs-progs: fsck-tests: add a test case with deprecated inode cache

 check/main.c                                    |  12 +++++++++---
 check/mode-lowmem.c                             |   9 +++++++++
 check/mode-original.h                           |   1 +
 .../4k_nodesize.img.xz                          | Bin 0 -> 17320 bytes
 .../064-deprecated-inode-cache/test.sh          |  14 ++++++++++++++
 5 files changed, 33 insertions(+), 3 deletions(-)
 create mode 100644 tests/fsck-tests/064-deprecated-inode-cache/4k_nodesize.img.xz
 create mode 100755 tests/fsck-tests/064-deprecated-inode-cache/test.sh

--
2.46.0