1
0
Fork 0

[PATCH] md: Make sure array geometry changes persist with version-1 superblocks

super_1_sync only updates fields in the superblock that might have changed.

'raid_disks' and 'size' could have changed, but this information doesn't get
updated....  until this patch.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
hifive-unleashed-5.1
NeilBrown 2006-02-02 14:28:04 -08:00 committed by Linus Torvalds
parent 6d89332b77
commit f0ca340cd2
1 changed files with 3 additions and 0 deletions

View File

@ -1161,6 +1161,9 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
sb->cnt_corrected_read = atomic_read(&rdev->corrected_errors);
sb->raid_disks = cpu_to_le32(mddev->raid_disks);
sb->size = cpu_to_le64(mddev->size);
if (mddev->bitmap && mddev->bitmap_file == NULL) {
sb->bitmap_offset = cpu_to_le32((__u32)mddev->bitmap_offset);
sb->feature_map = cpu_to_le32(MD_FEATURE_BITMAP_OFFSET);