aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 8f161743e18f..67bb0d046767 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1081,7 +1081,7 @@ static int super_1_validate(mddev_t *mddev, mdk_rdev_t *rdev)
1081 mddev->size = le64_to_cpu(sb->size)/2; 1081 mddev->size = le64_to_cpu(sb->size)/2;
1082 mddev->events = le64_to_cpu(sb->events); 1082 mddev->events = le64_to_cpu(sb->events);
1083 mddev->bitmap_offset = 0; 1083 mddev->bitmap_offset = 0;
1084 mddev->default_bitmap_offset = 1024; 1084 mddev->default_bitmap_offset = 1024 >> 9;
1085 1085
1086 mddev->recovery_cp = le64_to_cpu(sb->resync_offset); 1086 mddev->recovery_cp = le64_to_cpu(sb->resync_offset);
1087 memcpy(mddev->uuid, sb->set_uuid, 16); 1087 memcpy(mddev->uuid, sb->set_uuid, 16);
@@ -1162,7 +1162,7 @@ static void super_1_sync(mddev_t *mddev, mdk_rdev_t *rdev)
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); 1164 sb->raid_disks = cpu_to_le32(mddev->raid_disks);
1165 sb->size = cpu_to_le64(mddev->size); 1165 sb->size = cpu_to_le64(mddev->size<<1);
1166 1166
1167 if (mddev->bitmap && mddev->bitmap_file == NULL) { 1167 if (mddev->bitmap && mddev->bitmap_file == NULL) {
1168 sb->bitmap_offset = cpu_to_le32((__u32)mddev->bitmap_offset); 1168 sb->bitmap_offset = cpu_to_le32((__u32)mddev->bitmap_offset);