diff options
Diffstat (limited to 'block/blk-mq-sched.c')
-rw-r--r-- | block/blk-mq-sched.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index 3e9596738852..e7a690ae86c9 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -344,38 +344,6 @@ void blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx) } } -bool blk_mq_sched_try_merge(struct request_queue *q, struct bio *bio, - unsigned int nr_segs, struct request **merged_request) -{ - struct request *rq; - - switch (elv_merge(q, &rq, bio)) { - case ELEVATOR_BACK_MERGE: - if (!blk_mq_sched_allow_merge(q, rq, bio)) - return false; - if (bio_attempt_back_merge(rq, bio, nr_segs) != BIO_MERGE_OK) - return false; - *merged_request = attempt_back_merge(q, rq); - if (!*merged_request) - elv_merged_request(q, rq, ELEVATOR_BACK_MERGE); - return true; - case ELEVATOR_FRONT_MERGE: - if (!blk_mq_sched_allow_merge(q, rq, bio)) - return false; - if (bio_attempt_front_merge(rq, bio, nr_segs) != BIO_MERGE_OK) - return false; - *merged_request = attempt_front_merge(q, rq); - if (!*merged_request) - elv_merged_request(q, rq, ELEVATOR_FRONT_MERGE); - return true; - case ELEVATOR_DISCARD_MERGE: - return bio_attempt_discard_merge(q, rq, bio) == BIO_MERGE_OK; - default: - return false; - } -} -EXPORT_SYMBOL_GPL(blk_mq_sched_try_merge); - bool __blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio, unsigned int nr_segs) { |