[00/11] btrfs-progs: metadata_uuid feature fixes and portation
mbox series

Message ID 20191212110204.11128-1-Damenly_Su@gmx.com
Headers show
Series
  • btrfs-progs: metadata_uuid feature fixes and portation
Related show

Message

Su Yue Dec. 12, 2019, 11:01 a.m. UTC
From: Su Yue <Damenly_Su@gmx.com>

The series are inspired by easy failing misc-tests/034.
Those patches fix misc-tests/034 and add new test images.

After portation of kernel find fs_devices code, progs is able to
work on devices with FSID_CHANGING_V2 flag, not sure whether the
functionality is necessary. If not, I will remove it in next version.

Patch[1] adds a trivial module reload operation.
Patch[2] fixes failed mount by mounting another device.
Patch[2-10] port code for finding fs_devices. 
Patch[11] adds test images. 

Su Yue (11):
  btrfs-progs: misc-tests/034: reload btrfs module before running
    failure_recovery
  btrfs-progs: misc-tests/034: mount the second device if first device
    mount failed
  btrfs-progs: metadata_uuid: add new member
    btrfs_fs_devices::fsid_change
  btrfs-progs: handle split-brain scenario for scanned changing device
    without INCOMPAT_METADATA_UUID
  btrfs-progs: handle split-brain scenario for scanned changing device
    with INCOMPAT_METADATA_UUID
  btrfs-progs: handle split-brain scenario for scanned changed/unchanged
    device with INCOMPAT_METADATA_UUID
  btrfs-progs: handle split-brain scenario for scanned changed/unchanged
    device without INCOMPAT_METADATA_UUID
  btrfs-progs: metadata_uuid: remove old logic to find fs_devices
  btrfs-progs: metadata_uuid: rewrite fs_devices fsid and metadata_uuid
    if it's changing
  btrfs-progs: metadata_uuid: clear FSID_CHANGING_V2 while open_ctree()
  btrfs-progs: misc-tests/034: add new test images and modify the script

 disk-io.c                                     |  10 +-
 .../misc-tests/034-metadata-uuid/disk7.raw.xz | Bin 0 -> 48388 bytes
 .../misc-tests/034-metadata-uuid/disk8.raw.xz | Bin 0 -> 47084 bytes
 tests/misc-tests/034-metadata-uuid/test.sh    |  46 ++++-
 volumes.c                                     | 187 +++++++++++++++++-
 volumes.h                                     |   1 +
 6 files changed, 227 insertions(+), 17 deletions(-)
 create mode 100644 tests/misc-tests/034-metadata-uuid/disk7.raw.xz
 create mode 100644 tests/misc-tests/034-metadata-uuid/disk8.raw.xz

Comments

Nikolay Borisov Jan. 31, 2020, 8:05 a.m. UTC | #1
On 12.12.19 г. 13:01 ч., damenly.su@gmail.com wrote:
> From: Su Yue <Damenly_Su@gmx.com>
> 
> The series are inspired by easy failing misc-tests/034.
> Those patches fix misc-tests/034 and add new test images.
> 
> After portation of kernel find fs_devices code, progs is able to
> work on devices with FSID_CHANGING_V2 flag, not sure whether the
> functionality is necessary. If not, I will remove it in next version.

For now I think it's best if this is not added. Kernel is supposed to
handle split-brain scenarios upon device scan which is triggered
automatically by udev. If the need arises in the future then we can
think about integrating this code in btrfs-progs.
Su Yue Jan. 31, 2020, 10:04 a.m. UTC | #2
On 2020/1/31 4:05 PM, Nikolay Borisov wrote:
>
>
> On 12.12.19 г. 13:01 ч., damenly.su@gmail.com wrote:
>> From: Su Yue <Damenly_Su@gmx.com>
>>
>> The series are inspired by easy failing misc-tests/034.
>> Those patches fix misc-tests/034 and add new test images.
>>
>> After portation of kernel find fs_devices code, progs is able to
>> work on devices with FSID_CHANGING_V2 flag, not sure whether the
>> functionality is necessary. If not, I will remove it in next version.
>
> For now I think it's best if this is not added. Kernel is supposed to
> handle split-brain scenarios upon device scan which is triggered
> automatically by udev. If the need arises in the future then we can
> think about integrating this code in btrfs-progs.
>

Okay, so drop patch[3-11].
>