diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2010-05-14 19:16:41 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-05-18 02:03:05 +0200 |
commit | a1c88d0d7aa2ef427f78834c9a3b0a673a19dca6 (patch) | |
tree | be62930616401a30e3d4784a109c001323d4470a /drivers/block/drbd/drbd_receiver.c | |
parent | bb3d000cb99aa0924b78c1ae5f5943484527868a (diff) | |
download | lwn-a1c88d0d7aa2ef427f78834c9a3b0a673a19dca6.tar.gz lwn-a1c88d0d7aa2ef427f78834c9a3b0a673a19dca6.zip |
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/drbd/drbd_receiver.c')
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 6 |
1 files changed, 5 insertions, 1 deletions
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) ldsc = 1; } - max_seg_s = be32_to_cpu(p->max_segment_size); + if (mdev->agreed_pro_version < 94) + max_seg_s = be32_to_cpu(p->max_segment_size); + else /* drbd 8.3.8 onwards */ + max_seg_s = DRBD_MAX_SEGMENT_SIZE; + if (max_seg_s != queue_max_segment_size(mdev->rq_queue)) drbd_setup_queue_param(mdev, max_seg_s); |