Commit f0ca340c authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[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: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6d89332b
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment