diff options
| author | Josef Bacik <jbacik@fb.com> | 2018-07-03 07:15:00 -0800 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2018-07-09 07:07:54 -0800 |
| commit | 67b42d0bf7a8fd1ec0cf1acdc9550e688d7c8578 (patch) | |
| tree | f6aab5ca56ab6ba71846d93ff81afd0d34d3a3c1 /block/blk-rq-qos.c | |
| parent | c1c80384c8f47021a01a0cc42894a06bed2b801b (diff) | |
| download | linux-stable-67b42d0bf7a8fd1ec0cf1acdc9550e688d7c8578.tar.gz linux-stable-67b42d0bf7a8fd1ec0cf1acdc9550e688d7c8578.tar.bz2 linux-stable-67b42d0bf7a8fd1ec0cf1acdc9550e688d7c8578.tar.xz linux-stable-67b42d0bf7a8fd1ec0cf1acdc9550e688d7c8578.zip | |
rq-qos: introduce dio_bio callback
wbt cares only about request completion time, but controllers may need
information that is on the bio itself, so add a done_bio callback for
rq-qos so things like blk-iolatency can use it to have the bio when it
completes.
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-rq-qos.c')
| -rw-r--r-- | block/blk-rq-qos.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/block/blk-rq-qos.c b/block/blk-rq-qos.c index b7b02e04f64f..5134b24482f6 100644 --- a/block/blk-rq-qos.c +++ b/block/blk-rq-qos.c | |||
| @@ -88,6 +88,16 @@ void rq_qos_track(struct request_queue *q, struct request *rq, struct bio *bio) | |||
| 88 | } | 88 | } |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void rq_qos_done_bio(struct request_queue *q, struct bio *bio) | ||
| 92 | { | ||
| 93 | struct rq_qos *rqos; | ||
| 94 | |||
| 95 | for(rqos = q->rq_qos; rqos; rqos = rqos->next) { | ||
| 96 | if (rqos->ops->done_bio) | ||
| 97 | rqos->ops->done_bio(rqos, bio); | ||
| 98 | } | ||
| 99 | } | ||
| 100 | |||
| 91 | /* | 101 | /* |
| 92 | * Return true, if we can't increase the depth further by scaling | 102 | * Return true, if we can't increase the depth further by scaling |
| 93 | */ | 103 | */ |
