diff options
author | Ming Lei <ming.lei@redhat.com> | 2017-05-26 19:53:20 +0800 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-05-26 14:12:04 -0600 |
commit | 9bddeb2a5b981507cbe2d7bdb545c32f204109c7 (patch) | |
tree | c4ec4b6a5ccf0df214f33780375f9fe5afcff12a /block/blk-mq-sched.h | |
parent | ab42f35d9cb5ac49b5a2a11f940e74f58f207280 (diff) | |
download | op-kernel-dev-9bddeb2a5b981507cbe2d7bdb545c32f204109c7.zip op-kernel-dev-9bddeb2a5b981507cbe2d7bdb545c32f204109c7.tar.gz |
blk-mq: make per-sw-queue bio merge as default .bio_merge
Because what the per-sw-queue bio merge does is basically same with
scheduler's .bio_merge(), this patch makes per-sw-queue bio merge
as the default .bio_merge if no scheduler is used or io scheduler
doesn't provide .bio_merge().
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-sched.h')
-rw-r--r-- | block/blk-mq-sched.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/block/blk-mq-sched.h b/block/blk-mq-sched.h index edafb53..b87e5be 100644 --- a/block/blk-mq-sched.h +++ b/block/blk-mq-sched.h @@ -38,9 +38,7 @@ int blk_mq_sched_init(struct request_queue *q); static inline bool blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio) { - struct elevator_queue *e = q->elevator; - - if (!e || blk_queue_nomerges(q) || !bio_mergeable(bio)) + if (blk_queue_nomerges(q) || !bio_mergeable(bio)) return false; return __blk_mq_sched_bio_merge(q, bio); |