Skip to content

btrfs-progs: fix an old bug in lowmem mode

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs-progs: check/lowmem: fix a false alert when counting the refscheck/mode-lowmem.c+139 -60 replies
2/2btrfs-progs: fsck-tests: fix an image which has incorrect super dev itemtests/fsck-tests/020-extent-ref-cases/keyed_data_ref_with_reloc_leaf.img+0 -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: fix an old bug in lowmem mode

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