All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 0/2] btrfs-progs: check: report deprecated inode cache as errors
Date: Thu, 12 Sep 2024 18:09:18 +0930	[thread overview]
Message-ID: <cover.1726130115.git.wqu@suse.com> (raw)

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


             reply	other threads:[~2024-09-12  8:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-12  8:39 Qu Wenruo [this message]
2024-09-12  8:39 ` [PATCH 1/2] btrfs-progs: check: detect deprecated inode cache Qu Wenruo
2024-09-12  8:39 ` [PATCH 2/2] btrfs-progs: fsck-tests: add a test case with " Qu Wenruo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1726130115.git.wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.