diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index f9f991e6e138..92ef9b6abfc7 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -4452,7 +4452,7 @@ static raid5_conf_t *setup_conf(mddev_t *mddev) | |||
4452 | static int run(mddev_t *mddev) | 4452 | static int run(mddev_t *mddev) |
4453 | { | 4453 | { |
4454 | raid5_conf_t *conf; | 4454 | raid5_conf_t *conf; |
4455 | int working_disks = 0; | 4455 | int working_disks = 0, chunk_size; |
4456 | mdk_rdev_t *rdev; | 4456 | mdk_rdev_t *rdev; |
4457 | 4457 | ||
4458 | if (mddev->recovery_cp != MaxSector) | 4458 | if (mddev->recovery_cp != MaxSector) |
@@ -4607,6 +4607,14 @@ static int run(mddev_t *mddev) | |||
4607 | md_set_array_sectors(mddev, raid5_size(mddev, 0, 0)); | 4607 | md_set_array_sectors(mddev, raid5_size(mddev, 0, 0)); |
4608 | 4608 | ||
4609 | blk_queue_merge_bvec(mddev->queue, raid5_mergeable_bvec); | 4609 | blk_queue_merge_bvec(mddev->queue, raid5_mergeable_bvec); |
4610 | chunk_size = mddev->chunk_sectors << 9; | ||
4611 | blk_queue_io_min(mddev->queue, chunk_size); | ||
4612 | blk_queue_io_opt(mddev->queue, chunk_size * | ||
4613 | (conf->raid_disks - conf->max_degraded)); | ||
4614 | |||
4615 | list_for_each_entry(rdev, &mddev->disks, same_set) | ||
4616 | disk_stack_limits(mddev->gendisk, rdev->bdev, | ||
4617 | rdev->data_offset << 9); | ||
4610 | 4618 | ||
4611 | return 0; | 4619 | return 0; |
4612 | abort: | 4620 | abort: |