diff options
Diffstat (limited to 'drivers/md')
| -rw-r--r-- | drivers/md/dm.c | 1 | ||||
| -rw-r--r-- | drivers/md/multipath.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 5c210b0a4cb0..097d1e540090 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -768,6 +768,7 @@ static struct mapped_device *alloc_dev(unsigned int minor, int persistent) md->queue->backing_dev_info.congested_fn = dm_any_congested; md->queue->backing_dev_info.congested_data = md; blk_queue_make_request(md->queue, dm_request); + blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY); md->queue->unplug_fn = dm_unplug_all; md->queue->issue_flush_fn = dm_flush_all; 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) static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) { multipath_conf_t *conf = mddev->private; + struct request_queue *q; int found = 0; int path; struct multipath_info *p; @@ -311,8 +312,8 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev) for (path=0; path<mddev->raid_disks; path++) if ((p=conf->multipaths+path)->rdev == NULL) { - blk_queue_stack_limits(mddev->queue, - rdev->bdev->bd_disk->queue); + q = rdev->bdev->bd_disk->queue; + blk_queue_stack_limits(mddev->queue, q); /* as we don't honour merge_bvec_fn, we must never risk * 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) * (Note: it is very unlikely that a device with * merge_bvec_fn will be involved in multipath.) */ - if (rdev->bdev->bd_disk->queue->merge_bvec_fn && + if (q->merge_bvec_fn && mddev->queue->max_sectors > (PAGE_SIZE>>9)) blk_queue_max_sectors(mddev->queue, PAGE_SIZE>>9); |
