diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2009-07-01 11:13:45 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-07-01 11:13:45 +1000 |
commit | 8f6c2e4b325a8e9f8f47febb2fd0ed4fae7d45a9 (patch) | |
tree | 6e383e2ec48b5c90fe07325a7f6ab38ea1a97dfa /drivers/md/raid0.c | |
parent | 5a4f13fad1ab5bd08dea78fc55321e429d83cddf (diff) | |
download | op-kernel-dev-8f6c2e4b325a8e9f8f47febb2fd0ed4fae7d45a9.zip op-kernel-dev-8f6c2e4b325a8e9f8f47febb2fd0ed4fae7d45a9.tar.gz |
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/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index ab4a489..335f490 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -170,8 +170,8 @@ static int create_strip_zones(mddev_t *mddev) } dev[j] = rdev1; - blk_queue_stack_limits(mddev->queue, - rdev1->bdev->bd_disk->queue); + disk_stack_limits(mddev->gendisk, rdev1->bdev, + rdev1->data_offset << 9); /* as we don't honour merge_bvec_fn, we must never risk * violating it, so limit ->max_sector to one PAGE, as * a one page request is never in violation. @@ -250,6 +250,11 @@ static int create_strip_zones(mddev_t *mddev) mddev->chunk_sectors << 9); goto abort; } + + blk_queue_io_min(mddev->queue, mddev->chunk_sectors << 9); + blk_queue_io_opt(mddev->queue, + (mddev->chunk_sectors << 9) * mddev->raid_disks); + printk(KERN_INFO "raid0: done.\n"); mddev->private = conf; return 0; |