From: "Yu Kuai" <yukuai@fnnas.com>
To: <linan666@huaweicloud.com>, <song@kernel.org>,
<linan122@huawei.com>, <xni@redhat.com>
Cc: <linux-raid@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<bugreports61@gmail.com>, <yangerkun@huawei.com>,
<yi.zhang@huawei.com>, <yukuai@fnnas.com>
Subject: Re: [PATCH v3 2/2] md: Fix forward incompatibility from configurable logical block size
Date: Sat, 27 Dec 2025 10:16:52 +0800 [thread overview]
Message-ID: <2d09972c-a864-45c3-b247-29e3d03ea2ff@fnnas.com> (raw)
In-Reply-To: <20251226024221.724201-2-linan666@huaweicloud.com>
在 2025/12/26 10:42, linan666@huaweicloud.com 写道:
> From: Li Nan<linan122@huawei.com>
>
> Commit 62ed1b582246 ("md: allow configuring logical block size") used
> reserved pad to add 'logical_block_size' to metadata. RAID rejects
> non-zero reserved pad, so arrays fail when rolling back to old kernels
> after booting new ones.
>
> Set 'logical_block_size' only for newly created arrays to support rollback
> to old kernels. Importantly new arrays still won't work on old kernels to
> prevent data loss issue from LBS changes.
>
> For arrays created on old kernels which confirmed not to rollback,
> configure LBS by echo current LBS (queue/logical_block_size) to
> md/logical_block_size.
>
> Fixes: 62ed1b582246 ("md: allow configuring logical block size")
> Reported-by: BugReports<bugreports61@gmail.com>
> Closes:https://lore.kernel.org/linux-raid/825e532d-d1e1-44bb-5581-692b7c091796@huaweicloud.com/T/#t
> Signed-off-by: Li Nan<linan122@huawei.com>
> ---
> v3:
> - fix comment: %s/writing 'enable'/writing current LBS/
>
> v2:
> - move warn message to mddev_stack_rdev_limits
> - set current LBS to sysfs to enable feature instead of 'enable'
>
> drivers/md/md.c | 48 ++++++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 44 insertions(+), 4 deletions(-)
Applied to md-6.19 with a few wording changes:
| Location | Before | After |
|---------------------|-----------------------------------|--------------------------------------------|
| Line 5994 (comment) | configured in old kernels array | configured for arrays from old kernels |
| Line 6005 (pr_info) | config logical block size success | logical block size configured successfully |
| Line 6192 (comment) | new array | new arrays |
| Line 6197 (pr_info) | configurable lbs support | configurable LBS support |
| Line 6203 (pr_warn) | data loss issue | data loss issues |
--
Thansk,
Kuai
next prev parent reply other threads:[~2025-12-27 2:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-26 2:42 [PATCH v3 1/2] md: Fix logical_block_size configuration being overwritten linan666
2025-12-26 2:42 ` [PATCH v3 2/2] md: Fix forward incompatibility from configurable logical block size linan666
2025-12-27 2:16 ` Yu Kuai [this message]
2025-12-26 7:49 ` [PATCH v3 1/2] md: Fix logical_block_size configuration being overwritten Xiao Ni
2025-12-27 2:15 ` 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=2d09972c-a864-45c3-b247-29e3d03ea2ff@fnnas.com \
--to=yukuai@fnnas.com \
--cc=bugreports61@gmail.com \
--cc=linan122@huawei.com \
--cc=linan666@huaweicloud.com \
--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