aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/multipath.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r--drivers/md/multipath.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index e6aa309a66d7..96f7af4ae400 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -303,6 +303,7 @@ static void print_multipath_conf (multipath_conf_t *conf)
303static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) 303static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
304{ 304{
305 multipath_conf_t *conf = mddev->private; 305 multipath_conf_t *conf = mddev->private;
306 struct request_queue *q;
306 int found = 0; 307 int found = 0;
307 int path; 308 int path;
308 struct multipath_info *p; 309 struct multipath_info *p;
@@ -311,8 +312,8 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
311 312
312 for (path=0; path<mddev->raid_disks; path++) 313 for (path=0; path<mddev->raid_disks; path++)
313 if ((p=conf->multipaths+path)->rdev == NULL) { 314 if ((p=conf->multipaths+path)->rdev == NULL) {
314 blk_queue_stack_limits(mddev->queue, 315 q = rdev->bdev->bd_disk->queue;
315 rdev->bdev->bd_disk->queue); 316 blk_queue_stack_limits(mddev->queue, q);
316 317
317 /* as we don't honour merge_bvec_fn, we must never risk 318 /* as we don't honour merge_bvec_fn, we must never risk
318 * violating it, so limit ->max_sector to one PAGE, as 319 * violating it, so limit ->max_sector to one PAGE, as
@@ -320,7 +321,7 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
320 * (Note: it is very unlikely that a device with 321 * (Note: it is very unlikely that a device with
321 * merge_bvec_fn will be involved in multipath.) 322 * merge_bvec_fn will be involved in multipath.)
322 */ 323 */
323 if (rdev->bdev->bd_disk->queue->merge_bvec_fn && 324 if (q->merge_bvec_fn &&
324 mddev->queue->max_sectors > (PAGE_SIZE>>9)) 325 mddev->queue->max_sectors > (PAGE_SIZE>>9))
325 blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); 326 blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9);
326 327