aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2010-01-21 13:33:14 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-01-22 05:34:54 -0500
commit98ec286e016a028678cc943b1a1f87668ad447c8 (patch)
tree7e64c5f4537d7b16f1e786ae23dde5a8be1c5bae /drivers/block
parentf06f135d8642e2f6812cfcb4ea8e4e9122d4d58c (diff)
drbd: fix max_segment_size initialization
blk_queue_make_request() internally calls blk_set_default_limits(), so calling blk_queue_max_segment_size() before is useless. Ergo: move the call to blk_queue_max_segment_size() down a few lines. Impact: If, after a fresh modprobe, you first connect a Diskless drbd, then attach, this could result in a DRBD Protocol Error at first. The next connection attempt would then succeeded. 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_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index e898ad9eb1c3..ab871e00ffc5 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2973,7 +2973,6 @@ struct drbd_conf *drbd_new_device(unsigned int minor)
2973 goto out_no_q; 2973 goto out_no_q;
2974 mdev->rq_queue = q; 2974 mdev->rq_queue = q;
2975 q->queuedata = mdev; 2975 q->queuedata = mdev;
2976 blk_queue_max_segment_size(q, DRBD_MAX_SEGMENT_SIZE);
2977 2976
2978 disk = alloc_disk(1); 2977 disk = alloc_disk(1);
2979 if (!disk) 2978 if (!disk)
@@ -2997,6 +2996,7 @@ struct drbd_conf *drbd_new_device(unsigned int minor)
2997 q->backing_dev_info.congested_data = mdev; 2996 q->backing_dev_info.congested_data = mdev;
2998 2997
2999 blk_queue_make_request(q, drbd_make_request_26); 2998 blk_queue_make_request(q, drbd_make_request_26);
2999 blk_queue_max_segment_size(q, DRBD_MAX_SEGMENT_SIZE);
3000 blk_queue_bounce_limit(q, BLK_BOUNCE_ANY); 3000 blk_queue_bounce_limit(q, BLK_BOUNCE_ANY);
3001 blk_queue_merge_bvec(q, drbd_merge_bvec); 3001 blk_queue_merge_bvec(q, drbd_merge_bvec);
3002 q->queue_lock = &mdev->req_lock; /* needed since we use */ 3002 q->queue_lock = &mdev->req_lock; /* needed since we use */