diff options
author | Tejun Heo <tj@kernel.org> | 2019-08-28 15:05:54 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-08-28 21:17:05 -0600 |
commit | d3e65ffff61c329fb2d0bf15736c440c2d0cfc97 (patch) | |
tree | 2a105cbaeb09f223b4171644418b4d2697cf9ba2 /block/blk-core.c | |
parent | 015d254cb02b6d8eec4b3366274bf4672f9e0b64 (diff) | |
download | lwn-d3e65ffff61c329fb2d0bf15736c440c2d0cfc97.tar.gz lwn-d3e65ffff61c329fb2d0bf15736c440c2d0cfc97.zip |
block/rq_qos: add rq_qos_merge()
Add a merge hook for rq_qos. This will be used by io.weight.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 77807a5d7f9e..875e8d105067 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -604,6 +604,7 @@ bool bio_attempt_back_merge(struct request *req, struct bio *bio, return false; trace_block_bio_backmerge(req->q, req, bio); + rq_qos_merge(req->q, req, bio); if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff) blk_rq_set_mixed_merge(req); @@ -625,6 +626,7 @@ bool bio_attempt_front_merge(struct request *req, struct bio *bio, return false; trace_block_bio_frontmerge(req->q, req, bio); + rq_qos_merge(req->q, req, bio); if ((req->cmd_flags & REQ_FAILFAST_MASK) != ff) blk_rq_set_mixed_merge(req); @@ -650,6 +652,8 @@ bool bio_attempt_discard_merge(struct request_queue *q, struct request *req, blk_rq_get_max_sectors(req, blk_rq_pos(req))) goto no_merge; + rq_qos_merge(q, req, bio); + req->biotail->bi_next = bio; req->biotail = bio; req->__data_len += bio->bi_iter.bi_size; |