diff options
| author | David S. Miller <davem@davemloft.net> | 2010-03-22 20:05:26 -0700 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-03-22 20:05:26 -0700 | 
| commit | 91c030b4d6445ebe9fbddb86d584441f300df15c (patch) | |
| tree | e8a48e3ad9e0448c690268175e555fa651983546 /drivers/md/linear.c | |
| parent | 7c3456fdb503071787f7f972de1069b9cacd16f0 (diff) | |
| parent | ae6be51ed01d6c4aaf249a207b4434bc7785853b (diff) | |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/md/linear.c')
| -rw-r--r-- | drivers/md/linear.c | 12 | 
1 files changed, 7 insertions, 5 deletions
| diff --git a/drivers/md/linear.c b/drivers/md/linear.c index af2d39d603c7..bb2a23159b21 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c @@ -172,12 +172,14 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)  		disk_stack_limits(mddev->gendisk, rdev->bdev,  				  rdev->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 (rdev->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 (rdev->bdev->bd_disk->queue->merge_bvec_fn) { +			blk_queue_max_segments(mddev->queue, 1); +			blk_queue_segment_boundary(mddev->queue, +						   PAGE_CACHE_SIZE - 1); +		}  		conf->array_sectors += rdev->sectors;  		cnt++; | 
