summaryrefslogtreecommitdiff
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2018-04-26 00:21:59 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-06-21 04:02:49 +0900
commit06beec8716407961d6c4a74f1feaecd72013fa8b (patch)
tree08e4f90b95908795dd4824def2503d8d225a88bf /block/blk-mq.h
parent11ac08bd73ebfda3bb0c7b748d0306bdb658e6fe (diff)
blk-mq: fix sysfs inflight counter
[ Upstream commit bf0ddaba65ddbb2715af97041da8e7a45b2d8628 ] When the blk-mq inflight implementation was added, /proc/diskstats was converted to use it, but /sys/block/$dev/inflight was not. Fix it by adding another helper to count in-flight requests by data direction. Fixes: f299b7c7a9de ("blk-mq: provide internal in-flight variant") Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r--block/blk-mq.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 4933af9d61f7..877237e09083 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -136,6 +136,8 @@ static inline bool blk_mq_hw_queue_mapped(struct blk_mq_hw_ctx *hctx)
}
void blk_mq_in_flight(struct request_queue *q, struct hd_struct *part,
- unsigned int inflight[2]);
+ unsigned int inflight[2]);
+void blk_mq_in_flight_rw(struct request_queue *q, struct hd_struct *part,
+ unsigned int inflight[2]);
#endif