]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] md: Make sure array geometry changes persist with version-1 superblocks
authorNeilBrown <neilb@suse.de>
Thu, 2 Feb 2006 22:28:04 +0000 (14:28 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 2 Feb 2006 23:07:11 +0000 (15:07 -0800)
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>
drivers/md/md.c

index 9fac8ac496c5f2b0a1c792c4125f1803e304899c..06dee51456e8de0033c1ab341643189b8f494776 100644 (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);