lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <59a203c8-617e-467e-a63f-d3ba648116f3@wdc.com>
Date: Fri, 10 Jan 2025 11:29:15 +0000
From: Johannes Thumshirn <Johannes.Thumshirn@....com>
To: Filipe Manana <fdmanana@...nel.org>
CC: Johannes Thumshirn <jth@...nel.org>, Chris Mason <clm@...com>, Josef Bacik
	<josef@...icpanda.com>, David Sterba <dsterba@...e.com>,
	"linux-btrfs@...r.kernel.org" <linux-btrfs@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, Filipe Manana
	<fdmanana@...e.com>
Subject: Re: [PATCH v2 01/14] btrfs: don't try to delete RAID stripe-extents
 if we don't need to

On 09.01.25 16:27, Johannes Thumshirn wrote:
> On 09.01.25 16:15, Filipe Manana wrote:
>> On Thu, Jan 9, 2025 at 2:39 PM Johannes Thumshirn
>> <Johannes.Thumshirn@....com> wrote:
>>>
>>> On 09.01.25 13:35, Filipe Manana wrote:
>>>>> diff --git a/fs/btrfs/tests/raid-stripe-tree-tests.c b/fs/btrfs/tests/raid-stripe-tree-tests.c
>>>>> index 30f17eb7b6a8a1dfa9f66ed5508da42a70db1fa3..f060c04c7f76357e6d2c6ba78a8ba981e35645bd 100644
>>>>> --- a/fs/btrfs/tests/raid-stripe-tree-tests.c
>>>>> +++ b/fs/btrfs/tests/raid-stripe-tree-tests.c
>>>>> @@ -478,8 +478,9 @@ static int run_test(test_func_t test, u32 sectorsize, u32 nodesize)
>>>>>                    ret = PTR_ERR(root);
>>>>>                    goto out;
>>>>>            }
>>>>> -       btrfs_set_super_compat_ro_flags(root->fs_info->super_copy,
>>>>> +       btrfs_set_super_incompat_flags(root->fs_info->super_copy,
>>>>>                                            BTRFS_FEATURE_INCOMPAT_RAID_STRIPE_TREE);
>>>> This hunk seems unrelated to the rest of the patch, could be fixed in
>>>> a different patch in case it actually solves any problem (probably
>>>> not, but it's an incompat feature so it should be changed anyway).
>>>
>>> I'll make it a separate patch. RST is an incompat feature not a compat one.
>>>
>>> With this patch btrfs_delete_raid_extent() starts checking the incompat
>>> bit so it is fixing a 'problem'.
>>
>> Yes, but for that all that's needed is this call:
>>
>> btrfs_set_fs_incompat(root->fs_info, RAID_STRIPE_TREE);
>>
>> Right?
>>
>> Replacing the btrfs_set_super_compat_ro_flags() call with a call to
>> btrfs_set_super_incompat_flags() shouldn't be needed for this patch.
>> That's what I was referring to.
>>
> 
> Ah now I see the problem. I used btrfs_set_super_incompat_flags()
> instead of btrfs_set_fs_incompat() *facepalm*
> 

But when using btrfs_set_fs_incompat() we get the annoying btrfs_info() 
call about setting the flag. Which in case of a selftest is pointless.

Also btrfs_set_fs_incompat() calls btrfs_set_super_incompat_flags() 
internally, so I think using btrfs_set_super_incompat_flags() here is 
the way to go.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ