diff options
author | Linus Torvalds | 2010-03-19 00:55:24 +0100 |
---|---|---|
committer | Linus Torvalds | 2010-03-19 00:55:24 +0100 |
commit | 31cc1dd344d941358345bd02f24c629dada9b08c (patch) | |
tree | 9a8cd10e2e633cb83e1c7984adc85f58006dc2ec /drivers/md/raid0.c | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 (diff) | |
parent | md: deal with merge_bvec_fn in component devices better. (diff) | |
download | kernel-qcow2-linux-31cc1dd344d941358345bd02f24c629dada9b08c.tar.gz kernel-qcow2-linux-31cc1dd344d941358345bd02f24c629dada9b08c.tar.xz kernel-qcow2-linux-31cc1dd344d941358345bd02f24c629dada9b08c.zip |
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md:
md: deal with merge_bvec_fn in component devices better.
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index a1f7147b757f..377cf2a3c333 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -176,14 +176,15 @@ static int create_strip_zones(mddev_t *mddev) 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. + * violating it, so limit ->max_segments to 1, lying within + * a single page. */ - if (rdev1->bdev->bd_disk->queue->merge_bvec_fn && - queue_max_sectors(mddev->queue) > (PAGE_SIZE>>9)) - blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); - + if (rdev1->bdev->bd_disk->queue->merge_bvec_fn) { + blk_queue_max_segments(mddev->queue, 1); + blk_queue_segment_boundary(mddev->queue, + PAGE_CACHE_SIZE - 1); + } if (!smallest || (rdev1->sectors < smallest->sectors)) smallest = rdev1; cnt++; |