Commit e5c973e3 authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Ben Hutchings

drbd: merge_bvec_fn: properly remap bvm->bi_bdev

commit 3b9d35d7 upstream.

This was not noticed for many years. Affects operation if
md raid is used a backing device for DRBD.
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
[bwh: Backported to 3.2: s/device/mdev/]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 4ff42834
...@@ -1184,6 +1184,7 @@ int drbd_merge_bvec(struct request_queue *q, struct bvec_merge_data *bvm, struct ...@@ -1184,6 +1184,7 @@ int drbd_merge_bvec(struct request_queue *q, struct bvec_merge_data *bvm, struct
struct request_queue * const b = struct request_queue * const b =
mdev->ldev->backing_bdev->bd_disk->queue; mdev->ldev->backing_bdev->bd_disk->queue;
if (b->merge_bvec_fn) { if (b->merge_bvec_fn) {
bvm->bi_bdev = mdev->ldev->backing_bdev;
backing_limit = b->merge_bvec_fn(b, bvm, bvec); backing_limit = b->merge_bvec_fn(b, bvm, bvec);
limit = min(limit, backing_limit); limit = min(limit, backing_limit);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment