summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-29 10:15:10 -0600
committerJens Axboe <axboe@kernel.dk>2018-11-07 13:42:31 -0700
commit9ba20527f4d1430b5f3e5f566be5af3e156a3284 (patch)
tree0a4470642c0c4a939cf4c4d6a4bd9bf72356e962 /block/blk-core.c
parentba7b443422d66b765c1aafe67b050be7dad7c676 (diff)
blk-mq: provide mq_ops->busy() hook
We'll hook into this from blk_lld_busy(), allowing blk-mq to also return whether or not a given queue currently has requests in progress. Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index ce12515f9b9b..ca1a3af49f87 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -3431,6 +3431,8 @@ int blk_lld_busy(struct request_queue *q)
{
if (q->lld_busy_fn)
return q->lld_busy_fn(q);
+ if (q->mq_ops && q->mq_ops->busy)
+ return q->mq_ops->busy(q);
return 0;
}