[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4ae18bbf-3301-ac40-b422-629cefdd7b12@huaweicloud.com>
Date: Fri, 26 Sep 2025 15:22:40 +0800
From: Li Nan <linan666@...weicloud.com>
To: Li Nan <linan666@...weicloud.com>, Xiao Ni <xni@...hat.com>
Cc: corbet@....net, song@...nel.org, yukuai3@...wei.com, hare@...e.de,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-raid@...r.kernel.org, martin.petersen@...cle.com,
yangerkun@...wei.com, yi.zhang@...wei.com
Subject: Re: [PATCH v5 2/2] md: allow configuring logical block size
在 2025/9/25 16:34, Li Nan 写道:
>
>
> 在 2025/9/23 22:06, Xiao Ni 写道:
>> On Tue, Sep 23, 2025 at 9:37 PM Li Nan <linan666@...weicloud.com> wrote:
>>>
>>>
>>>
>>> 在 2025/9/23 19:36, Xiao Ni 写道:
>>>> Hi Li Nan
>>>>
>>>> On Thu, Sep 18, 2025 at 8:08 PM <linan666@...weicloud.com> wrote:
>>>>>
>>>>> From: Li Nan <linan122@...wei.com>
>>>>>
>>>>> Previously, raid array used the maximum logical block size (LBS)
>>>>> of all member disks. Adding a larger LBS disk at runtime could
>>>>> unexpectedly increase RAID's LBS, risking corruption of existing
>>>>> partitions. This can be reproduced by:
[...]
>>>>> +static ssize_t
>>>>> +lbs_store(struct mddev *mddev, const char *buf, size_t len)
>>>>> +{
>>>>> + unsigned int lbs;
>>>>> + int err = -EBUSY;
>>>>> +
>>>>> + /* Only 1.x meta supports configurable LBS */
>>>>> + if (mddev->major_version == 0)
>>>>> + return -EINVAL;
>>>>
>>>> It looks like it should check raid level here as doc mentioned above,
>>>> right?
>>>
>>> Yeah, kuai suggests supporting this feature only in 1.x meta.
>>
>> I mean it should check if raid is raid0 here, right? As doc mentioned,
>> it should return error if raid is level 0.
>>
>> Regards
>> Xiao
>
> Apologies — I misunderstood. I will add check in v6.
>
I found that md_logical_block_size.attr is added to md_redundancy_attrs and
is is only created when pers->sync_request is present. Raid0 will not
create it. So the check is unnecessary.
--
Thanks,
Nan
Powered by blists - more mailing lists