diff options
author | NeilBrown <neilb@suse.de> | 2006-02-02 14:28:04 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-02 15:07:11 -0800 |
commit | f0ca340cd20b350eab8288974e9a6077900846e8 (patch) | |
tree | c438cf3fc472ae1fb22a64cede2e192a72cb97d6 | |
parent | 6d89332b776fc11bac0073209e44ec8f39831e4e (diff) | |
download | linux-f0ca340cd20b350eab8288974e9a6077900846e8.tar.bz2 |
[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>
-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) 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); |