Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

md: fix update super 1.0 on rdev size change

The superblock of version 1.0 doesn't get moved to the new position on a
device size change. This leads to a rdev without a superblock on a known
position, the raid can't be re-assembled.

The line was removed by mistake and is re-added by this patch.

Fixes: d9c0fa509eaf ("md: fix max sectors calculation for super 1.0")
Cc: stable@vger.kernel.org
Signed-off-by: Markus Hochholdinger <markus@hochholdinger.net>
Reviewed-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <songliubraving@fb.com>

authored by

Markus Hochholdinger and committed by
Song Liu
55df1ce0 091f06d9

+1
+1
drivers/md/md.c
··· 2189 2189 2190 2190 if (!num_sectors || num_sectors > max_sectors) 2191 2191 num_sectors = max_sectors; 2192 + rdev->sb_start = sb_start; 2192 2193 } 2193 2194 sb = page_address(rdev->sb_page); 2194 2195 sb->data_size = cpu_to_le64(num_sectors);