Re: [PATCH 018 of 29] md: Support changing rdev size on running arrays.
From: Guoqing Jiang <hidden>
Date: 2021-11-12 01:22:34
On 11/11/21 11:09 PM, Markus Hochholdinger wrote:
quoted hunk ↗ jump to hunk
It's possible, I've found the error: rdev->sb_start = sb_start; is missing within md.c within /* minor version 0; superblock after data */ From my understanding, this means the new calculated superblock position isn't used. I changed:--- a/drivers/md/md.c 2021-09-30 08:11:08.000000000 +0000 +++ b/drivers/md/md.c 2021-11-11 14:54:10.535633028 +0000@@ -2252,6 +2252,7 @@ if (!num_sectors || num_sectors > max_sectors) num_sectors = max_sectors; + rdev->sb_start = sb_start; } sb = page_address(rdev->sb_page); sb->data_size = cpu_to_le64(num_sectors);I tested it with 5.10.46 and resizing with superblock version 1.0 is now working for me. If this is correct, how can I get this into longterm 5.10.x and the current kernel upstream?
Please refer to submitting-patches.rst and stable-kernel-rules.rst which
are under
Documentation.
And I think this tag need to be added in your patch.
Fixes: commit d9c0fa509eaf ("md: fix max sectors calculation for super 1.0")
Thanks,
Guoqing