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>
        struct request_queue * const b = mdev->ldev->backing_bdev->bd_disk->queue;
        int max_segments = mdev->ldev->dc.max_bio_bvecs;
 
-       if (b->merge_bvec_fn && !mdev->ldev->dc.use_bmbv)
-               max_seg_s = PAGE_SIZE;
-
        max_seg_s = min(queue_max_sectors(b) * queue_logical_block_size(b), max_seg_s);
 
        blk_queue_max_hw_sectors(q, max_seg_s >> 9);
 
                        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);
 
 
        } else if (limit && get_ldev(mdev)) {
                struct request_queue * const b =
                        mdev->ldev->backing_bdev->bd_disk->queue;
-               if (b->merge_bvec_fn && mdev->ldev->dc.use_bmbv) {
+               if (b->merge_bvec_fn) {
                        backing_limit = b->merge_bvec_fn(b, bvm, bvec);
                        limit = min(limit, backing_limit);
                }