aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/genhd.h
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2018-04-26 00:21:59 -0700
committerJens Axboe <axboe@kernel.dk>2018-04-26 09:02:01 -0600
commitbf0ddaba65ddbb2715af97041da8e7a45b2d8628 (patch)
tree42ecea860351829817753e8ce2c4205a8aaff8b1 /include/linux/genhd.h
parentblk-mq: count allocated but not started requests in iostats inflight (diff)
downloadwireguard-linux-bf0ddaba65ddbb2715af97041da8e7a45b2d8628.tar.xz
wireguard-linux-bf0ddaba65ddbb2715af97041da8e7a45b2d8628.zip
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 'include/linux/genhd.h')
-rw-r--r--include/linux/genhd.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index c826b0b5232a..6cb8a5789668 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -368,7 +368,9 @@ static inline void free_part_stats(struct hd_struct *part)
part_stat_add(cpu, gendiskp, field, -subnd)
void part_in_flight(struct request_queue *q, struct hd_struct *part,
- unsigned int inflight[2]);
+ unsigned int inflight[2]);
+void part_in_flight_rw(struct request_queue *q, struct hd_struct *part,
+ unsigned int inflight[2]);
void part_dec_in_flight(struct request_queue *q, struct hd_struct *part,
int rw);
void part_inc_in_flight(struct request_queue *q, struct hd_struct *part,