block: add rq_qos_wait to rq_qos
authorJosef Bacik <josef@toxicpanda.com>
Tue, 4 Dec 2018 17:59:02 +0000 (12:59 -0500)
committerJens Axboe <axboe@kernel.dk>
Sat, 8 Dec 2018 05:26:38 +0000 (22:26 -0700)
commit84f603246db9703aca05aad58b94a54dfbf44327
treea2235d4f431e619f04292aea0349399ab4b8da68
parent7754f669ffde3919e398a9e591cd7510d6cf4e73
block: add rq_qos_wait to rq_qos

Originally when I split out the common code from blk-wbt into rq_qos I
left the wbt_wait() where it was and simply copied and modified it
slightly to work for io-latency.  However they are both basically the
same thing, and as time has gone on wbt_wait() has ended up much smarter
and kinder than it was when I copied it into io-latency, which means
io-latency has lost out on these improvements.

Since they are the same thing essentially except for a few minor things,
create rq_qos_wait() that replicates what wbt_wait() currently does with
callbacks that can be passed in for the snowflakes to do their own thing
as appropriate.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-rq-qos.c
block/blk-rq-qos.h