Skip to content

Commit 55df1ce

Browse files
Markus Hochholdingerliu-song-6
authored andcommitted
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: d9c0fa5 ("md: fix max sectors calculation for super 1.0") Cc: [email protected] Signed-off-by: Markus Hochholdinger <[email protected]> Reviewed-by: Xiao Ni <[email protected]> Signed-off-by: Song Liu <[email protected]>
1 parent 091f06d commit 55df1ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/md/md.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2189,6 +2189,7 @@ super_1_rdev_size_change(struct md_rdev *rdev, sector_t num_sectors)
21892189

21902190
if (!num_sectors || num_sectors > max_sectors)
21912191
num_sectors = max_sectors;
2192+
rdev->sb_start = sb_start;
21922193
}
21932194
sb = page_address(rdev->sb_page);
21942195
sb->data_size = cpu_to_le64(num_sectors);

0 commit comments

Comments
 (0)