block: kill merge_bvec_fn() completely
[firefly-linux-kernel-4.4.55.git] / drivers / md / multipath.c
index 082a489af9d38f4d60bf76bd147812713a6208b0..d222522c52e077dcdd012fbf22d929fc6a7cb0ad 100644 (file)
@@ -257,18 +257,6 @@ static int multipath_add_disk(struct mddev *mddev, struct md_rdev *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_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) {
-                               blk_queue_max_segments(mddev->queue, 1);
-                               blk_queue_segment_boundary(mddev->queue,
-                                                          PAGE_CACHE_SIZE - 1);
-                       }
-
                        spin_lock_irq(&conf->device_lock);
                        mddev->degraded--;
                        rdev->raid_disk = path;
@@ -432,15 +420,6 @@ static int multipath_run (struct mddev *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, 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) {
-                       blk_queue_max_segments(mddev->queue, 1);
-                       blk_queue_segment_boundary(mddev->queue,
-                                                  PAGE_CACHE_SIZE - 1);
-               }
-
                if (!test_bit(Faulty, &rdev->flags))
                        working_disks++;
        }