btrfs-progs: fix bugs and CHANGING_FSID_V2 flag
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 10 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | btrfs-progs: fix duplicate missing devicekernel-shared/ | +3 | 0 replies | |
| 2/11 | btrfs-progs: call warn() for missing devicekernel-shared/ | +1 | 3 replies | |
| 3/11 | btrfs-progs: track missing device counterkernel-shared/ kernel-shared/ | +3 | 0 replies | |
| 4/11 | btrfs-progs: NULL initialize device name for missingkernel-shared/ | +2 | 0 replies | |
| 5/11 | btrfs-progs: tune: check for missing devicetune/ | +7 | 2 replies | |
| 6/11 | btrfs-progs: track changing_fsid flag in fs_deviceskernel-shared/ kernel-shared/ tune/ | +12 | 0 replies | |
| 7/11 | btrfs-progs: track num_devices per fs_deviceskernel-shared/ kernel-shared/ | +2 | 0 replies | |
| 8/11 | btrfs-progs: track total_devs in fs deviceskernel-shared/ kernel-shared/ | +4 | 2 replies | |
| 9/11 | btrfs-progs: track active metadata_uuid per fs_deviceskernel-shared/ kernel-shared/ tune/ | +5 | 0 replies | |
| 10/11 | btrfs-progs: add helper to reunite devices with same metadata_uuidcommon/ common/ kernel-shared/ +1 more | +118 | 0 replies | |
| 11/11 | btrfs-progs: tune: fix incomplete fsid_changetune/ tune/ | +9 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/11] btrfs-progs: fix bugs and CHANGING_FSID_V2 flag
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(-)
Signature · 1 line
2.39.3