mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
[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>
This commit is contained in:
parent
6d89332b77
commit
f0ca340cd2
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue