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: fix an old bug in lowmem mode
Date: Thu, 29 May 2025 16:58:18 +0930	[thread overview]
Message-ID: <cover.1748503407.git.wqu@suse.com> (raw)

Inspired by Mark's recent enhanced super block dev item check against
chunk tree device item, it turns out there are several existing images
not passing the check.

One of the check is fsck/020/keyed_data_ref_with_reloc_leaf.img, which
may be caused by some older kernels (the bug is already fixed a long
time ago).

The first patch is to fix a lowmem mode check bug, that it doesn't
correctly account the keyed backref with shared backref.

This is exposed by the image from the next patch.

Then the last patch is to update the image with a proper note on how to
re-create it.
And the new image also acts as a regression test for the above lowmem
bug.

Please note this is not the last fsck image which has such problem,
fsck/057 is another one, and will be addressed in a dedicated patch.

Qu Wenruo (2):
  btrfs-progs: check/lowmem: fix a false alert when counting the refs
  btrfs-progs: fsck-tests: fix an image which has incorrect super dev
    item

 check/mode-lowmem.c                           | 145 +++++++++++++++++-
 .../keyed_data_ref_with_reloc_leaf.img        | Bin 16384 -> 19456 bytes
 2 files changed, 139 insertions(+), 6 deletions(-)

--
2.49.0


             reply	other threads:[~2025-05-29  7:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-29  7:28 Qu Wenruo [this message]
2025-05-29  7:28 ` [PATCH 1/2] btrfs-progs: check/lowmem: fix a false alert when counting the refs Qu Wenruo
2025-05-29  7:28 ` [PATCH 2/2] btrfs-progs: fsck-tests: fix an image which has incorrect super dev item Qu Wenruo
2025-05-30 11:37 ` [PATCH 0/2] btrfs-progs: fix an old bug in lowmem mode David Sterba

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.1748503407.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.