Skip to content

btrfs-progs: add check and repair ability for super num devices mismatch

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs-progs: check: add check and repair ability for super num devs mismatchcheck/main.c check/mode-common.c check/mode-common.h+91 -03 replies
2/2btrfs-progs: tests/fsck: add test case for super num devs mismatchtests/fsck-tests/054-super-num-devs-mismatch/default.raw.xz+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: add check and repair ability for super num devices mismatch

The patchset can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/super_num_devs

The 2nd patch contains a compressed raw image, thus it may be a little too large for the mail list.

This patchset will allow btrfs check to detect and repair super num devices mismatch.

The detect part is to iterate through chunk tree to grab the correct number of devices.
This is more reliable than counting devices in fs_devices, since seed device is in another fs_devices.

The repair is more straightforward, just reset the value in superblock and commit a transaction.

Qu Wenruo (2):
btrfs-progs: check: add check and repair ability for super num devs
mismatch
btrfs-progs: tests/fsck: add test case for super num devs mismatch

 check/main.c                                  |   1 +
 check/mode-common.c                           |  88 ++++++++++++++++++
 check/mode-common.h                           |   2 +
 .../default.raw.xz                            | Bin 0 -> 22028 bytes
 4 files changed, 91 insertions(+)
 create mode 100644 tests/fsck-tests/054-super-num-devs-mismatch/default.raw.xz
Signature · 1 line
2.35.1