aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid10.c')
-rw-r--r--drivers/md/raid10.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index fb6b88674e87..407c81a820f4 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -674,7 +674,7 @@ static sector_t raid10_find_virt(struct r10conf *conf, sector_t sector, int dev)
674 674
675/** 675/**
676 * raid10_mergeable_bvec -- tell bio layer if a two requests can be merged 676 * raid10_mergeable_bvec -- tell bio layer if a two requests can be merged
677 * @q: request queue 677 * @mddev: the md device
678 * @bvm: properties of new bio 678 * @bvm: properties of new bio
679 * @biovec: the request that could be merged to it. 679 * @biovec: the request that could be merged to it.
680 * 680 *
@@ -682,11 +682,10 @@ static sector_t raid10_find_virt(struct r10conf *conf, sector_t sector, int dev)
682 * This requires checking for end-of-chunk if near_copies != raid_disks, 682 * This requires checking for end-of-chunk if near_copies != raid_disks,
683 * and for subordinate merge_bvec_fns if merge_check_needed. 683 * and for subordinate merge_bvec_fns if merge_check_needed.
684 */ 684 */
685static int raid10_mergeable_bvec(struct request_queue *q, 685static int raid10_mergeable_bvec(struct mddev *mddev,
686 struct bvec_merge_data *bvm, 686 struct bvec_merge_data *bvm,
687 struct bio_vec *biovec) 687 struct bio_vec *biovec)
688{ 688{
689 struct mddev *mddev = q->queuedata;
690 struct r10conf *conf = mddev->private; 689 struct r10conf *conf = mddev->private;
691 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); 690 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev);
692 int max; 691 int max;
@@ -3756,7 +3755,6 @@ static int run(struct mddev *mddev)
3756 stripe /= conf->geo.near_copies; 3755 stripe /= conf->geo.near_copies;
3757 if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe) 3756 if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe)
3758 mddev->queue->backing_dev_info.ra_pages = 2 * stripe; 3757 mddev->queue->backing_dev_info.ra_pages = 2 * stripe;
3759 blk_queue_merge_bvec(mddev->queue, raid10_mergeable_bvec);
3760 } 3758 }
3761 3759
3762 if (md_integrity_register(mddev)) 3760 if (md_integrity_register(mddev))
@@ -4717,6 +4715,7 @@ static struct md_personality raid10_personality =
4717 .start_reshape = raid10_start_reshape, 4715 .start_reshape = raid10_start_reshape,
4718 .finish_reshape = raid10_finish_reshape, 4716 .finish_reshape = raid10_finish_reshape,
4719 .congested = raid10_congested, 4717 .congested = raid10_congested,
4718 .mergeable_bvec = raid10_mergeable_bvec,
4720}; 4719};
4721 4720
4722static int __init raid_init(void) 4721static int __init raid_init(void)