diff options
author | NeilBrown <neilb@suse.de> | 2006-02-02 17:28:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-02 18:07:11 -0500 |
commit | f0ca340cd20b350eab8288974e9a6077900846e8 (patch) | |
tree | c438cf3fc472ae1fb22a64cede2e192a72cb97d6 /drivers/md/md.c | |
parent | 6d89332b776fc11bac0073209e44ec8f39831e4e (diff) |
[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>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 9fac8ac496c5..06dee51456e8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -1161,6 +1161,9 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev) | |||
1161 | 1161 | ||
1162 | sb->cnt_corrected_read = atomic_read(&rdev->corrected_errors); | 1162 | sb->cnt_corrected_read = atomic_read(&rdev->corrected_errors); |
1163 | 1163 | ||
1164 | sb->raid_disks = cpu_to_le32(mddev->raid_disks); | ||
1165 | sb->size = cpu_to_le64(mddev->size); | ||
1166 | |||
1164 | if (mddev->bitmap && mddev->bitmap_file == NULL) { | 1167 | if (mddev->bitmap && mddev->bitmap_file == NULL) { |
1165 | sb->bitmap_offset = cpu_to_le32((__u32)mddev->bitmap_offset); | 1168 | sb->bitmap_offset = cpu_to_le32((__u32)mddev->bitmap_offset); |
1166 | sb->feature_map = cpu_to_le32(MD_FEATURE_BITMAP_OFFSET); | 1169 | sb->feature_map = cpu_to_le32(MD_FEATURE_BITMAP_OFFSET); |