diff options
author | NeilBrown <neilb@suse.de> | 2006-02-02 23:28:04 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-03 00:07:11 +0100 |
commit | f0ca340cd20b350eab8288974e9a6077900846e8 (patch) | |
tree | c438cf3fc472ae1fb22a64cede2e192a72cb97d6 /drivers/md | |
parent | [PATCH] md: Fix device-size updates in md (diff) | |
download | linux-f0ca340cd20b350eab8288974e9a6077900846e8.tar.xz linux-f0ca340cd20b350eab8288974e9a6077900846e8.zip |
[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')
-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); |