mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Reviewed-by: Omar Sandoval <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
7f5562d5ec
commit
d62e26b3ff
13 changed files with 64 additions and 49 deletions
|
|
@ -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)));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue