public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs-progs: add check and repair ability for super num devices mismatch
@ 2022-02-28  0:50 Qu Wenruo
  2022-02-28  0:50 ` [PATCH 1/2] btrfs-progs: check: add check and repair ability for super num devs mismatch Qu Wenruo
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Qu Wenruo @ 2022-02-28  0:50 UTC (permalink / raw)
  To: linux-btrfs

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

-- 
2.35.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-03-24 15:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-28  0:50 [PATCH 0/2] btrfs-progs: add check and repair ability for super num devices mismatch Qu Wenruo
2022-02-28  0:50 ` [PATCH 1/2] btrfs-progs: check: add check and repair ability for super num devs mismatch Qu Wenruo
2022-03-23 17:43   ` David Sterba
2022-03-23 23:15     ` Qu Wenruo
2022-03-23 23:38       ` Qu Wenruo
2022-02-28  0:50 ` [PATCH 2/2] btrfs-progs: tests/fsck: add test case " Qu Wenruo
2022-03-23 17:12 ` [PATCH 0/2] btrfs-progs: add check and repair ability for super num devices mismatch David Sterba
2022-03-23 17:17 ` David Sterba
2022-03-23 23:30   ` Qu Wenruo
2022-03-24 15:12     ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox