diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2010-05-14 13:16:41 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-05-17 20:03:05 -0400 |
commit | a1c88d0d7aa2ef427f78834c9a3b0a673a19dca6 (patch) | |
tree | be62930616401a30e3d4784a109c001323d4470a /drivers/block | |
parent | bb3d000cb99aa0924b78c1ae5f5943484527868a (diff) |
drbd: always use_bmbv, ignore setting
Now that the peer may handle multi-bio EEs,
we can ignore the peer's limit,
and concentrate on the limits of the local IO stack.
This is safe accross drbd protocol versions,
as our queue_max_sectors() will be adjusted accordingly.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 3 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 6 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 28ef76bd5230..f20336bc59c8 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -704,9 +704,6 @@ void drbd_setup_queue_param(struct drbd_conf *mdev, unsigned int max_seg_s) __mu | |||
704 | struct request_queue * const b = mdev->ldev->backing_bdev->bd_disk->queue; | 704 | struct request_queue * const b = mdev->ldev->backing_bdev->bd_disk->queue; |
705 | int max_segments = mdev->ldev->dc.max_bio_bvecs; | 705 | int max_segments = mdev->ldev->dc.max_bio_bvecs; |
706 | 706 | ||
707 | if (b->merge_bvec_fn && !mdev->ldev->dc.use_bmbv) | ||
708 | max_seg_s = PAGE_SIZE; | ||
709 | |||
710 | max_seg_s = min(queue_max_sectors(b) * queue_logical_block_size(b), max_seg_s); | 707 | max_seg_s = min(queue_max_sectors(b) * queue_logical_block_size(b), max_seg_s); |
711 | 708 | ||
712 | blk_queue_max_hw_sectors(q, max_seg_s >> 9); | 709 | blk_queue_max_hw_sectors(q, max_seg_s >> 9); |
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 388a3e8bb0d0..a04ec01ab3ce 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -3011,7 +3011,11 @@ static int receive_sizes(struct drbd_conf *mdev, struct p_header *h) | |||
3011 | ldsc = 1; | 3011 | ldsc = 1; |
3012 | } | 3012 | } |
3013 | 3013 | ||
3014 | max_seg_s = be32_to_cpu(p->max_segment_size); | 3014 | if (mdev->agreed_pro_version < 94) |
3015 | max_seg_s = be32_to_cpu(p->max_segment_size); | ||
3016 | else /* drbd 8.3.8 onwards */ | ||
3017 | max_seg_s = DRBD_MAX_SEGMENT_SIZE; | ||
3018 | |||
3015 | if (max_seg_s != queue_max_segment_size(mdev->rq_queue)) | 3019 | if (max_seg_s != queue_max_segment_size(mdev->rq_queue)) |
3016 | drbd_setup_queue_param(mdev, max_seg_s); | 3020 | drbd_setup_queue_param(mdev, max_seg_s); |
3017 | 3021 | ||
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index d8d9bbfca3b8..343e0e6dd532 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c | |||
@@ -1110,7 +1110,7 @@ int drbd_merge_bvec(struct request_queue *q, struct bvec_merge_data *bvm, struct | |||
1110 | } else if (limit && get_ldev(mdev)) { | 1110 | } else if (limit && get_ldev(mdev)) { |
1111 | struct request_queue * const b = | 1111 | struct request_queue * const b = |
1112 | mdev->ldev->backing_bdev->bd_disk->queue; | 1112 | mdev->ldev->backing_bdev->bd_disk->queue; |
1113 | if (b->merge_bvec_fn && mdev->ldev->dc.use_bmbv) { | 1113 | if (b->merge_bvec_fn) { |
1114 | backing_limit = b->merge_bvec_fn(b, bvm, bvec); | 1114 | backing_limit = b->merge_bvec_fn(b, bvm, bvec); |
1115 | limit = min(limit, backing_limit); | 1115 | limit = min(limit, backing_limit); |
1116 | } | 1116 | } |