From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 00/11] btrfs-progs: fix bugs and CHANGING_FSID_V2 flag
Date: Fri, 7 Jul 2023 23:52:30 +0800 [thread overview]
Message-ID: <cover.1688724045.git.anand.jain@oracle.com> (raw)
Btrfstune currently lacks support for fixing incomplete or broken
previous runs. Instead, it relies on the kernel to assemble the
correct set of devices based on metadata_uuid, generation, and
the CHANGE_FSID_V2 flag.
However, depending on the kernel to handle this interim change_fsid
state may not be suitable for all situations. For instance, if
there are other fsids sharing the same metadata_uuid but are not
part of the incomplete fsid, the assembly process in the kernel
may not be transparent or controllable to the user. So, this patch
set bring the ability to fix incomplete fsid changes to the userland
using btrfstune.
This patch set fixes bugs as in the individual change log,
introduces new fs_devices members and helper functions, and
the last patch provides the feature discussed.
To ensure proper device assembly and to mitigate any potential
incorrect assembly this feature is behind the --noscan and
--device options. And calls automatically, however I am ok to
add another option like --fix-changing_fsid if you think it
makes sense. However, I don't think it is needed as of now
the kernel does it with all normal options.
This patch set depends on:
--noscan and --device option:
[PATCH 00/10] btrfs-progs: check and tune: add device and noscan options
Testing:
The btrfs-progs tests/misc-tests/034-metadata_uuid include a series of 4
disk images that contain incomplete fsid states (changing_fsid).
To evaluate this patch set, the images were tested using a local script,
which is not yet prepared for submission.
The typical testing steps involve:
xz --uncompress --keep <imgs>
btrfstune -m --noscan --device=disk1.raw disk2.raw
btrfstune -m --noscan --device=disk2.raw disk1.raw
btrfstune -m --noscan --device=disk3.raw disk4.raw
btrfstune -m --noscan --device=disk4.raw disk3.raw
and so on.
I plan to migrate misc-test/034-metadata_uuid test cases to assess
btrfstune, as the kernel's support for fixing the changing_fsid state
will be removed.
This patch set has successfully passed the btrfs-progs test cases.
Thanks.
Anand Jain (11):
btrfs-progs: fix duplicate missing device
btrfs-progs: call warn() for missing device
btrfs-progs: track missing device counter
btrfs-progs: NULL initialize device name for missing
btrfs-progs: tune: check for missing device
btrfs-progs: track changing_fsid flag in fs_devices
btrfs-progs: track num_devices per fs_devices
btrfs-progs: track total_devs in fs devices
btrfs-progs: track active metadata_uuid per fs_devices
btrfs-progs: add helper to reunite devices with same metadata_uuid
btrfs-progs: tune: fix incomplete fsid_change
common/device-scan.c | 42 ++++++++++++++++
common/device-scan.h | 1 +
kernel-shared/volumes.c | 99 +++++++++++++++++++++++++++++++++++--
kernel-shared/volumes.h | 8 +++
tune/change-metadata-uuid.c | 4 +-
tune/change-uuid.c | 4 +-
tune/main.c | 16 +++++-
7 files changed, 166 insertions(+), 8 deletions(-)
--
2.39.3
next reply other threads:[~2023-07-07 15:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 15:52 Anand Jain [this message]
2023-07-07 15:52 ` [PATCH 01/11] btrfs-progs: fix duplicate missing device Anand Jain
2023-07-07 15:52 ` [PATCH 02/11] btrfs-progs: call warn() for " Anand Jain
2023-07-13 18:48 ` David Sterba
2023-07-17 18:22 ` Anand Jain
2023-07-19 14:34 ` Anand Jain
2023-07-07 15:52 ` [PATCH 03/11] btrfs-progs: track missing device counter Anand Jain
2023-07-07 15:52 ` [PATCH 04/11] btrfs-progs: NULL initialize device name for missing Anand Jain
2023-07-07 15:52 ` [PATCH 05/11] btrfs-progs: tune: check for missing device Anand Jain
2023-07-13 18:49 ` David Sterba
2023-07-17 19:02 ` Anand Jain
2023-07-07 15:52 ` [PATCH 06/11] btrfs-progs: track changing_fsid flag in fs_devices Anand Jain
2023-07-07 15:52 ` [PATCH 07/11] btrfs-progs: track num_devices per fs_devices Anand Jain
2023-07-07 15:52 ` [PATCH 08/11] btrfs-progs: track total_devs in fs devices Anand Jain
2023-07-13 18:58 ` David Sterba
2023-07-17 19:28 ` Anand Jain
2023-07-07 15:52 ` [PATCH 09/11] btrfs-progs: track active metadata_uuid per fs_devices Anand Jain
2023-07-07 15:52 ` [PATCH 10/11] btrfs-progs: add helper to reunite devices with same metadata_uuid Anand Jain
2023-07-07 15:52 ` [PATCH 11/11] btrfs-progs: tune: fix incomplete fsid_change Anand Jain
2023-07-13 18:57 ` David Sterba
2023-07-17 19:25 ` Anand Jain
2023-07-20 14:33 ` Anand Jain
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.1688724045.git.anand.jain@oracle.com \
--to=anand.jain@oracle.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.