diff options
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r-- | drivers/md/linear.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index ec921f58fbb8..57644a780f16 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -256,7 +256,7 @@ static int linear_run (mddev_t *mddev) | |||
256 | if (!conf) | 256 | if (!conf) |
257 | return 1; | 257 | return 1; |
258 | mddev->private = conf; | 258 | mddev->private = conf; |
259 | mddev->array_size = conf->array_size; | 259 | mddev->array_sectors = conf->array_size * 2; |
260 | 260 | ||
261 | blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec); | 261 | blk_queue_merge_bvec(mddev->queue, linear_mergeable_bvec); |
262 | mddev->queue->unplug_fn = linear_unplug; | 262 | mddev->queue->unplug_fn = linear_unplug; |
@@ -290,8 +290,8 @@ static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev) | |||
290 | newconf->prev = mddev_to_conf(mddev); | 290 | newconf->prev = mddev_to_conf(mddev); |
291 | mddev->private = newconf; | 291 | mddev->private = newconf; |
292 | mddev->raid_disks++; | 292 | mddev->raid_disks++; |
293 | mddev->array_size = newconf->array_size; | 293 | mddev->array_sectors = newconf->array_size * 2; |
294 | set_capacity(mddev->gendisk, mddev->array_size << 1); | 294 | set_capacity(mddev->gendisk, mddev->array_sectors); |
295 | return 0; | 295 | return 0; |
296 | } | 296 | } |
297 | 297 | ||