diff options
author | Jens Axboe <axboe@kernel.dk> | 2017-07-01 05:55:08 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-09 21:09:16 +0200 |
commit | d62e26b3ffd28f16ddae85a1babd0303a1a6dfb6 (patch) | |
tree | 622dd61c60712f31575b2cdde0811529b829ba8a /block/partition-generic.c | |
parent | blk-mq-tag: check for NULL rq when iterating tags (diff) | |
download | linux-d62e26b3ffd28f16ddae85a1babd0303a1a6dfb6.tar.xz linux-d62e26b3ffd28f16ddae85a1babd0303a1a6dfb6.zip |
block: pass in queue to inflight accounting
No functional change in this patch, just in preparation for
basing the inflight mechanism on the queue in question.
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/partition-generic.c')
-rw-r--r-- | block/partition-generic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/partition-generic.c b/block/partition-generic.c index c5ec8246e25e..d1bdd61e1d71 100644 --- a/block/partition-generic.c +++ b/block/partition-generic.c @@ -112,10 +112,11 @@ ssize_t part_stat_show(struct device *dev, struct device_attribute *attr, char *buf) { struct hd_struct *p = dev_to_part(dev); + struct request_queue *q = dev_to_disk(dev)->queue; int cpu; cpu = part_stat_lock(); - part_round_stats(cpu, p); + part_round_stats(q, cpu, p); part_stat_unlock(); return sprintf(buf, "%8lu %8lu %8llu %8u " @@ -130,7 +131,7 @@ ssize_t part_stat_show(struct device *dev, part_stat_read(p, merges[WRITE]), (unsigned long long)part_stat_read(p, sectors[WRITE]), jiffies_to_msecs(part_stat_read(p, ticks[WRITE])), - part_in_flight(p), + part_in_flight(q, p), jiffies_to_msecs(part_stat_read(p, io_ticks)), jiffies_to_msecs(part_stat_read(p, time_in_queue))); } |