mbox series

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

Message ID 20191212110204.11128-1-Damenly_Su@gmx.com (mailing list archive)
Headers show
Series btrfs-progs: metadata_uuid feature fixes and portation | expand

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].
>
David Sterba March 4, 2020, 2:14 p.m. UTC | #3
On Fri, Jan 31, 2020 at 06:04:42PM +0800, Su Yue wrote:
> 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].

So patches 1 and 2 have been applied. Thanks.
Su Yue March 5, 2020, 1:18 a.m. UTC | #4
On 2020/3/4 10:14 PM, David Sterba wrote:
> On Fri, Jan 31, 2020 at 06:04:42PM +0800, Su Yue wrote:
>> 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].
>
> So patches 1 and 2 have been applied. Thanks.
>
Sorry. David, please remove the patch 2 if applied.
There is another better solution applied by Marcos
https://www.spinics.net/lists/linux-btrfs/msg98370.html.

Try to update status about dropping things on time next time:).

Thanks
David Sterba March 5, 2020, 2:16 p.m. UTC | #5
On Thu, Mar 05, 2020 at 09:18:26AM +0800, Su Yue wrote:
> On 2020/3/4 10:14 PM, David Sterba wrote:
> > On Fri, Jan 31, 2020 at 06:04:42PM +0800, Su Yue wrote:
> >> 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].
> >
> > So patches 1 and 2 have been applied. Thanks.
> >
> Sorry. David, please remove the patch 2 if applied.
> There is another better solution applied by Marcos
> https://www.spinics.net/lists/linux-btrfs/msg98370.html.
> 
> Try to update status about dropping things on time next time:).

No problem, this could happen when there's long delay between posting
and merging. Thanks for letting me know.