mbox series

[0/2,v2] btrfs: reject device with CHANGING_FSID_V2 flag

Message ID cover.1695244296.git.anand.jain@oracle.com (mailing list archive)
Headers show
Series btrfs: reject device with CHANGING_FSID_V2 flag | expand

Message

Anand Jain Sept. 20, 2023, 9:51 p.m. UTC
v2: Splits the patch into two parts: one for the new code to reject
devices with CHANGING_FSID_V2 and the second to remove the unused code.

The btrfs-progs code to reunite devices with the CHANGING_FSID_V2 flag,
which is ported from the kernel, can be found in the following btrfs-progs
patchset:

 [PATCH 0/4 v4] btrfs-progs: recover from failed metadata_uuid port kernel
    btrfs-progs: tune use the latest bdev in fs_devices for super_copy
    btrfs-progs: add support to fix superblock with CHANGING_FSID_V2 flag
    btrfs-progs: recover from the failed btrfstune -m|M
    btrfs-progs: test btrfstune -m|M ability to fix previous failures

Furthermore, when the kernel stops supporting the CHANGING_FSID_V2 flag,
we will need to update the btrfs-progs test case accordingly:

    btrfs-progs: misc-tests/034-metadata-uuid remove kernel support

v1:
https://lore.kernel.org/linux-btrfs/02d59bdd7a8b778deb17e300354558498db59376.1692178060.git.anand.jain@oracle.com


Anand Jain (2):
  btrfs: reject device with CHANGING_FSID_V2
  btrfs: remove unused code related to the CHANGING_FSID_V2 flag

 fs/btrfs/disk-io.c |  10 ---
 fs/btrfs/volumes.c | 166 ++++-----------------------------------------
 fs/btrfs/volumes.h |   1 -
 3 files changed, 13 insertions(+), 164 deletions(-)

Comments

David Sterba Sept. 25, 2023, 4:58 p.m. UTC | #1
On Thu, Sep 21, 2023 at 05:51:12AM +0800, Anand Jain wrote:
> v2: Splits the patch into two parts: one for the new code to reject
> devices with CHANGING_FSID_V2 and the second to remove the unused code.
> 
> The btrfs-progs code to reunite devices with the CHANGING_FSID_V2 flag,
> which is ported from the kernel, can be found in the following btrfs-progs
> patchset:
> 
>  [PATCH 0/4 v4] btrfs-progs: recover from failed metadata_uuid port kernel
>     btrfs-progs: tune use the latest bdev in fs_devices for super_copy
>     btrfs-progs: add support to fix superblock with CHANGING_FSID_V2 flag
>     btrfs-progs: recover from the failed btrfstune -m|M
>     btrfs-progs: test btrfstune -m|M ability to fix previous failures
> 
> Furthermore, when the kernel stops supporting the CHANGING_FSID_V2 flag,
> we will need to update the btrfs-progs test case accordingly:
> 
>     btrfs-progs: misc-tests/034-metadata-uuid remove kernel support
> 
> v1:
> https://lore.kernel.org/linux-btrfs/02d59bdd7a8b778deb17e300354558498db59376.1692178060.git.anand.jain@oracle.com
> 
> 
> Anand Jain (2):
>   btrfs: reject device with CHANGING_FSID_V2
>   btrfs: remove unused code related to the CHANGING_FSID_V2 flag

Added to misc-next, thanks. I've updated the 2nd patch with some
historical background. The temp-fsid patch now does not apply cleanly,
I'll do a refresh on top of this series. Once it's in for-next, please
have a look. Thanks.
Anand Jain Sept. 25, 2023, 11:56 p.m. UTC | #2
On 26/09/2023 00:58, David Sterba wrote:
> On Thu, Sep 21, 2023 at 05:51:12AM +0800, Anand Jain wrote:
>> v2: Splits the patch into two parts: one for the new code to reject
>> devices with CHANGING_FSID_V2 and the second to remove the unused code.
>>
>> The btrfs-progs code to reunite devices with the CHANGING_FSID_V2 flag,
>> which is ported from the kernel, can be found in the following btrfs-progs
>> patchset:
>>
>>   [PATCH 0/4 v4] btrfs-progs: recover from failed metadata_uuid port kernel
>>      btrfs-progs: tune use the latest bdev in fs_devices for super_copy
>>      btrfs-progs: add support to fix superblock with CHANGING_FSID_V2 flag
>>      btrfs-progs: recover from the failed btrfstune -m|M
>>      btrfs-progs: test btrfstune -m|M ability to fix previous failures
>>
>> Furthermore, when the kernel stops supporting the CHANGING_FSID_V2 flag,
>> we will need to update the btrfs-progs test case accordingly:
>>
>>      btrfs-progs: misc-tests/034-metadata-uuid remove kernel support
>>
>> v1:
>> https://lore.kernel.org/linux-btrfs/02d59bdd7a8b778deb17e300354558498db59376.1692178060.git.anand.jain@oracle.com
>>
>>
>> Anand Jain (2):
>>    btrfs: reject device with CHANGING_FSID_V2
>>    btrfs: remove unused code related to the CHANGING_FSID_V2 flag
> 


> Added to misc-next, thanks.

> I've updated the 2nd patch with some
> historical background.

Now much more complete! Thanks.

> The temp-fsid patch now does not apply cleanly,
> I'll do a refresh on top of this series. Once it's in for-next, please
> have a look. Thanks.

Sure. But, temp-fsid v4 still has a subvol mount bug, as reported
before. I have a fix that is in-memory only. I am trying to get a
reasonable list of fstests passed before sending it out. Guilherme
can add the super-block flag on top of this, although it is not
mandatory from the btrfs internals pov. I will send out the
in-memory based temp-fsid soon I get the fstests (with some fix)
working today.

Thanks, Anand
David Sterba Sept. 27, 2023, 5:43 p.m. UTC | #3
On Tue, Sep 26, 2023 at 07:56:57AM +0800, Anand Jain wrote:
> On 26/09/2023 00:58, David Sterba wrote:
> > On Thu, Sep 21, 2023 at 05:51:12AM +0800, Anand Jain wrote:
> >> v2: Splits the patch into two parts: one for the new code to reject
> >> devices with CHANGING_FSID_V2 and the second to remove the unused code.
> >>
> >> The btrfs-progs code to reunite devices with the CHANGING_FSID_V2 flag,
> >> which is ported from the kernel, can be found in the following btrfs-progs
> >> patchset:
> >>
> >>   [PATCH 0/4 v4] btrfs-progs: recover from failed metadata_uuid port kernel
> >>      btrfs-progs: tune use the latest bdev in fs_devices for super_copy
> >>      btrfs-progs: add support to fix superblock with CHANGING_FSID_V2 flag
> >>      btrfs-progs: recover from the failed btrfstune -m|M
> >>      btrfs-progs: test btrfstune -m|M ability to fix previous failures
> >>
> >> Furthermore, when the kernel stops supporting the CHANGING_FSID_V2 flag,
> >> we will need to update the btrfs-progs test case accordingly:
> >>
> >>      btrfs-progs: misc-tests/034-metadata-uuid remove kernel support
> >>
> >> v1:
> >> https://lore.kernel.org/linux-btrfs/02d59bdd7a8b778deb17e300354558498db59376.1692178060.git.anand.jain@oracle.com
> >>
> >>
> >> Anand Jain (2):
> >>    btrfs: reject device with CHANGING_FSID_V2
> >>    btrfs: remove unused code related to the CHANGING_FSID_V2 flag
> > 
> 
> 
> > Added to misc-next, thanks.
> 
> > I've updated the 2nd patch with some
> > historical background.
> 
> Now much more complete! Thanks.
> 
> > The temp-fsid patch now does not apply cleanly,
> > I'll do a refresh on top of this series. Once it's in for-next, please
> > have a look. Thanks.
> 
> Sure. But, temp-fsid v4 still has a subvol mount bug, as reported
> before. I have a fix that is in-memory only. I am trying to get a
> reasonable list of fstests passed before sending it out. Guilherme
> can add the super-block flag on top of this, although it is not
> mandatory from the btrfs internals pov. I will send out the
> in-memory based temp-fsid soon I get the fstests (with some fix)
> working today.

Feel free the send the patches even if there are still failing tests,
I'd like to get an idea of how are you fixing the remaining problem(s).
Thanks.
Anand Jain Sept. 28, 2023, 1:25 a.m. UTC | #4
On 28/09/2023 01:43, David Sterba wrote:
> On Tue, Sep 26, 2023 at 07:56:57AM +0800, Anand Jain wrote:
>> On 26/09/2023 00:58, David Sterba wrote:
>>> On Thu, Sep 21, 2023 at 05:51:12AM +0800, Anand Jain wrote:
>>>> v2: Splits the patch into two parts: one for the new code to reject
>>>> devices with CHANGING_FSID_V2 and the second to remove the unused code.
>>>>
>>>> The btrfs-progs code to reunite devices with the CHANGING_FSID_V2 flag,
>>>> which is ported from the kernel, can be found in the following btrfs-progs
>>>> patchset:
>>>>
>>>>    [PATCH 0/4 v4] btrfs-progs: recover from failed metadata_uuid port kernel
>>>>       btrfs-progs: tune use the latest bdev in fs_devices for super_copy
>>>>       btrfs-progs: add support to fix superblock with CHANGING_FSID_V2 flag
>>>>       btrfs-progs: recover from the failed btrfstune -m|M
>>>>       btrfs-progs: test btrfstune -m|M ability to fix previous failures
>>>>
>>>> Furthermore, when the kernel stops supporting the CHANGING_FSID_V2 flag,
>>>> we will need to update the btrfs-progs test case accordingly:
>>>>
>>>>       btrfs-progs: misc-tests/034-metadata-uuid remove kernel support
>>>>
>>>> v1:
>>>> https://lore.kernel.org/linux-btrfs/02d59bdd7a8b778deb17e300354558498db59376.1692178060.git.anand.jain@oracle.com
>>>>
>>>>
>>>> Anand Jain (2):
>>>>     btrfs: reject device with CHANGING_FSID_V2
>>>>     btrfs: remove unused code related to the CHANGING_FSID_V2 flag
>>>
>>
>>
>>> Added to misc-next, thanks.
>>
>>> I've updated the 2nd patch with some
>>> historical background.
>>
>> Now much more complete! Thanks.
>>
>>> The temp-fsid patch now does not apply cleanly,
>>> I'll do a refresh on top of this series. Once it's in for-next, please
>>> have a look. Thanks.
>>
>> Sure. But, temp-fsid v4 still has a subvol mount bug, as reported
>> before. I have a fix that is in-memory only. I am trying to get a
>> reasonable list of fstests passed before sending it out. Guilherme
>> can add the super-block flag on top of this, although it is not
>> mandatory from the btrfs internals pov. I will send out the
>> in-memory based temp-fsid soon I get the fstests (with some fix)
>> working today.
> 
> Feel free the send the patches even if there are still failing tests,
> I'd like to get an idea of how are you fixing the remaining problem(s).
> Thanks.

Yep, it is almost ready. A few minor cleanups and code optimizations
are still due. However, I have sent them for the review comments.
Below are the patches in the mailing list now. Also, after sending
them, I realized it would have been easier for the searches if the
subject included 'temp-fsid' instead of 'cloned-device'

  [PATCH 0/2] btrfs: support cloned-device mount capability

  [PATCH 0/2] btrfs-progs: mkfs: testing cloned-device


Thanks, Anand