From: "Yu Kuai" <yukuai@fnnas.com>
To: "Xiao Ni" <xni@redhat.com>
Cc: "Li Nan" <linan666@huaweicloud.com>, <corbet@lwn.net>,
<song@kernel.org>, <hare@suse.de>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-raid@vger.kernel.org>,
<yangerkun@huawei.com>, <yi.zhang@huawei.com>
Subject: Re: [PATCH v9 4/5] md: add check_new_feature module parameter
Date: Fri, 7 Nov 2025 01:06:02 +0800 [thread overview]
Message-ID: <8e240c3c-3cf7-4d48-8e13-2146a5d36c2b@fnnas.com> (raw)
In-Reply-To: <CALTww29X5KizukDHpNcdeHS8oQ-vejwqTYrV5RFnOesZbFhYBQ@mail.gmail.com>
Hi,
在 2025/11/6 22:56, Xiao Ni 写道:
> On Thu, Nov 6, 2025 at 9:31 PM Yu Kuai <yukuai@fnnas.com> wrote:
>> Hi,
>>
>> 在 2025/11/6 21:15, Xiao Ni 写道:
>>> In patch05, the commit says this:
>>>
>>> Future mdadm should support setting LBS via metadata field during RAID
>>> creation and the new sysfs. Though the kernel allows runtime LBS changes,
>>> users should avoid modifying it after creating partitions or filesystems
>>> to prevent compatibility issues.
>>>
>>> So it only can specify logical block size when creating an array. In
>>> the case you mentioned above, in step3, the array will be assembled in
>>> new kernel and the sb->pad3 will not be set, right?
>> No, lbs will be set to the value array actually use in metadata, otherwise
>> data loss problem will not be fixed for the array with different lbs from
>> underlying disks, this is what we want to fix in the first place.
> But the case you mentioned is to assemble an existing array in a new
> kernel. The existing array in the old kernel doesn't set lbs. So the
> sb->pad3 will be zero when assembling it in the new kernel.
Looks like you misunderstood the patch, lbs in sb->pad3 will be updated to the
real lbs when array is assembled in the new kernel. Set lbs in metadata is
necessary to avoid data loss.
And please noted this patch is required to be backported to old kernel to
make it possible that array with default lbs can be assembled again in old
kernel.
>
> And as planned, we will not support --lbs (for example) for the `mdadm
> --assemble` command.
>
> The original problem should be fixed by specifying lbs when creating
> an array (https://www.spinics.net/lists/raid/msg80870.html). Maybe we
> should avoid updating lbs when adding a new disk?
I don't understand, lbs modification should be forbidden once array is
created, it's only allowed to be updated before the array is running the
first time.
>
> Regards
> Xiao
>> Thanks,
>> Kuai
>>
next prev parent reply other threads:[~2025-11-06 17:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-03 12:57 [PATCH v9 0/5] make logical block size configurable linan666
2025-11-03 12:57 ` [PATCH v9 1/5] md: delete md_redundancy_group when array is becoming inactive linan666
2025-11-03 12:57 ` [PATCH v9 2/5] md: init bioset in mddev_init linan666
2025-11-04 1:24 ` Xiao Ni
2025-11-03 12:57 ` [PATCH v9 3/5] md/raid0: Move queue limit setup before r0conf initialization linan666
2025-11-03 12:57 ` [PATCH v9 4/5] md: add check_new_feature module parameter linan666
2025-11-04 1:47 ` Xiao Ni
2025-11-04 2:52 ` Li Nan
2025-11-04 7:17 ` Xiao Ni
2025-11-06 3:44 ` Yu Kuai
2025-11-06 12:35 ` Xiao Ni
2025-11-06 12:48 ` Yu Kuai
2025-11-06 13:15 ` Xiao Ni
2025-11-06 13:30 ` Yu Kuai
2025-11-06 14:56 ` Xiao Ni
2025-11-06 17:06 ` Yu Kuai [this message]
2025-11-10 2:26 ` Xiao Ni
2025-11-04 7:07 ` Li Nan
2025-11-03 12:57 ` [PATCH v9 5/5] md: allow configuring logical block size linan666
2025-11-10 2:30 ` Xiao Ni
2025-11-11 3:21 ` [PATCH v9 0/5] make logical block size configurable Yu Kuai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8e240c3c-3cf7-4d48-8e13-2146a5d36c2b@fnnas.com \
--to=yukuai@fnnas.com \
--cc=corbet@lwn.net \
--cc=hare@suse.de \
--cc=linan666@huaweicloud.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=song@kernel.org \
--cc=xni@redhat.com \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®