diff options
author | Omar Sandoval <osandov@fb.com> | 2018-04-26 10:21:59 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-04-26 18:02:01 +0300 |
commit | bf0ddaba65ddbb2715af97041da8e7a45b2d8628 (patch) | |
tree | 42ecea860351829817753e8ce2c4205a8aaff8b1 /block/blk-mq.h | |
parent | 6131837b1de66116459ef4413e26fdbc70d066dc (diff) | |
download | linux-bf0ddaba65ddbb2715af97041da8e7a45b2d8628.tar.xz |
blk-mq: fix sysfs inflight counter
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>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r-- | block/blk-mq.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h index 89b5cd3a6c70..e1bb420dc5d6 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -188,7 +188,9 @@ 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]); static inline void blk_mq_put_dispatch_budget(struct blk_mq_hw_ctx *hctx) { |