public inbox for linux-btrfs@vger.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: add check and repair ability for super num devices mismatch
Date: Mon, 28 Feb 2022 08:50:06 +0800	[thread overview]
Message-ID: <cover.1646009185.git.wqu@suse.com> (raw)

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


             reply	other threads:[~2022-02-28  0:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28  0:50 Qu Wenruo [this message]
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

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.1646009185.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox