diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 11:59:37 +0200 | 
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-05-10 14:20:42 +0200 | 
| commit | dbb6be6d5e974c42bbecd183effaa0df69e1dd8b (patch) | |
| tree | 5735cb47e70853d057a9881dd0ce44b83e88fa63 /drivers/md/raid10.c | |
| parent | 6a867a395558a7f882d041783e4cdea6744ca2bf (diff) | |
| parent | b57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff) | |
| download | olio-linux-3.10-dbb6be6d5e974c42bbecd183effaa0df69e1dd8b.tar.xz olio-linux-3.10-dbb6be6d5e974c42bbecd183effaa0df69e1dd8b.zip  | |
Merge branch 'linus' into timers/core
Reason: Further posix_cpu_timer patches depend on mainline changes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/md/raid10.c')
| -rw-r--r-- | drivers/md/raid10.c | 29 | 
1 files changed, 18 insertions, 11 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 7584f9ab9bc..e2766d8251a 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -18,6 +18,7 @@   * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   */ +#include <linux/slab.h>  #include <linux/delay.h>  #include <linux/blkdev.h>  #include <linux/seq_file.h> @@ -1155,13 +1156,17 @@ static int raid10_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)  			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. +			/* as we don't honour merge_bvec_fn, we must +			 * never risk violating it, so limit +			 * ->max_segments to one lying with a single +			 * page, as a one page request is never in +			 * violation.  			 */ -			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); +			}  			p->head_position = 0;  			rdev->raid_disk = mirror; @@ -2255,12 +2260,14 @@ static int run(mddev_t *mddev)  		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); +		}  		disk->head_position = 0;  	}  |