Re: [PATCH v3 2/2] md: Fix forward incompatibility from configurable logical block size
"Yu Kuai" <[email protected]>
| Newsgroups | gmane.linux.raid,gmane.linux.kernel |
|---|---|
| Message-ID | <[email protected]> |
在 2025/12/26 10:42, [email protected] 写道: > From: Li Nan<[email protected]> > > 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<[email protected]> > Closes:https://lore.kernel.org/linux-raid/[email protected]/T/#t > Signed-off-by: Li Nan<[email protected]> > --- > 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