diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2009-06-30 21:13:45 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-06-30 21:13:45 -0400 |
commit | 8f6c2e4b325a8e9f8f47febb2fd0ed4fae7d45a9 (patch) | |
tree | 6e383e2ec48b5c90fe07325a7f6ab38ea1a97dfa /drivers/md/raid5.c | |
parent | 5a4f13fad1ab5bd08dea78fc55321e429d83cddf (diff) |
md: Use new topology calls to indicate alignment and I/O sizes
Switch MD over to the new disk_stack_limits() function which checks for
aligment and adjusts preferred I/O sizes when stacking.
Also indicate preferred I/O sizes where applicable.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
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: |