summaryrefslogtreecommitdiff
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2017-08-08 17:51:45 -0600
committerJens Axboe <axboe@kernel.dk>2017-08-09 13:09:28 -0600
commitf299b7c7a9dee64425e5965bd4f56dc024c1befc (patch)
treed81520896fad3b9d3e87c19d538ec00c052d1b7c /block/blk-mq.h
parent0609e0efc5e15195ecf8c6d2f2e890d98760e337 (diff)
blk-mq: provide internal in-flight variant
We don't have to inc/dec some counter, since we can just iterate the tags. That makes inc/dec a noop, but means we have to iterate busy tags to get an in-flight count. Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r--block/blk-mq.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 60b01c0309bc..98252b79b80b 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -133,4 +133,7 @@ static inline bool blk_mq_hw_queue_mapped(struct blk_mq_hw_ctx *hctx)
return hctx->nr_ctx && hctx->tags;
}
+void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part,
+ unsigned int inflight[2]);
+
#endif