diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-03-21 09:33:25 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-03-21 09:33:25 +0100 |
commit | 93929ebc813e2bbb768676ed13a1661893631504 (patch) | |
tree | b22e6e45ea149e02d2fbe2e29b38db0bfa98f32b /drivers/md/multipath.c | |
parent | ALSA: hda - Add alc_codec_rename() helper (diff) | |
parent | ALSA: hda - Add PCI quirk for HP dv6-1110ax. (diff) | |
download | linux-93929ebc813e2bbb768676ed13a1661893631504.tar.xz linux-93929ebc813e2bbb768676ed13a1661893631504.zip |
Merge branch 'fix/hda' into topic/hda
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 4b323f45ad74..5558ebc705c8 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c @@ -301,14 +301,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 +478,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++; |