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/multipath.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/multipath.c')
| -rw-r--r-- | drivers/md/multipath.c | 21 | 
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 4b323f45ad7..789bf535d29 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c @@ -22,6 +22,7 @@  #include <linux/blkdev.h>  #include <linux/raid/md_u.h>  #include <linux/seq_file.h> +#include <linux/slab.h>  #include "md.h"  #include "multipath.h" @@ -301,14 +302,16 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)  					  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 one, lying +		 * within a single page.  		 * (Note: it is very unlikely that a device with  		 * merge_bvec_fn will be involved in multipath.)  		 */ -			if (q->merge_bvec_fn && -			    queue_max_sectors(q) > (PAGE_SIZE>>9)) -				blk_queue_max_hw_sectors(mddev->queue, PAGE_SIZE>>9); +			if (q->merge_bvec_fn) { +				blk_queue_max_segments(mddev->queue, 1); +				blk_queue_segment_boundary(mddev->queue, +							   PAGE_CACHE_SIZE - 1); +			}  			conf->working_disks++;  			mddev->degraded--; @@ -476,9 +479,11 @@ static int multipath_run (mddev_t *mddev)  		/* as we don't honour merge_bvec_fn, we must never risk  		 * violating it, not that we ever expect a device with  		 * a merge_bvec_fn to be involved in multipath */ -		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); +		}  		if (!test_bit(Faulty, &rdev->flags))  			conf->working_disks++;  |