diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-10-29 10:15:10 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-07 13:42:31 -0700 |
commit | 9ba20527f4d1430b5f3e5f566be5af3e156a3284 (patch) | |
tree | 0a4470642c0c4a939cf4c4d6a4bd9bf72356e962 /block | |
parent | ba7b443422d66b765c1aafe67b050be7dad7c676 (diff) | |
download | linux-9ba20527f4d1430b5f3e5f566be5af3e156a3284.tar.bz2 |
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')
-rw-r--r-- | block/blk-core.c | 2 |
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; } |