Skip to content

btrfs-progs: check: report deprecated inode cache as errors

Qu Wenruo linux-btrfs 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs-progs: check: detect deprecated inode cachecheck/main.c check/mode-lowmem.c check/mode-original.h+19 -30 replies
2/2btrfs-progs: fsck-tests: add a test case with deprecated inode cachetests/fsck-tests/064-deprecated-inode-cache/4k_nodesize.img.xz tests/fsck-tests/064-deprecated-inode-cache/test.sh+14 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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