Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84903
b: refs/heads/master
c: 28f39d5
h: refs/heads/master
i:
  84901: 26f930a
  84899: 86e620d
  84895: 25a4ab3
v: v3
  • Loading branch information
Jerome Marchand authored and Jens Axboe committed Feb 8, 2008
1 parent c53a90f commit d609035
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 34e8beac92c27d292938065f8375842d2840767c
refs/heads/master: 28f39d553ee242000e62f6c589ee3dc6de3f9aaa
28 changes: 22 additions & 6 deletions trunk/block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,12 +584,28 @@ static int diskstats_show(struct seq_file *s, void *v)
for (n = 0; n < gp->minors - 1; n++) {
struct hd_struct *hd = gp->part[n];

if (hd && hd->nr_sects)
seq_printf(s, "%4d %4d %s %u %u %u %u\n",
gp->major, n + gp->first_minor + 1,
disk_name(gp, n + 1, buf),
hd->ios[0], hd->sectors[0],
hd->ios[1], hd->sectors[1]);
if (!hd || !hd->nr_sects)
continue;

preempt_disable();
part_round_stats(hd);
preempt_enable();
seq_printf(s, "%4d %4d %s %lu %lu %llu "
"%u %lu %lu %llu %u %u %u %u\n",
gp->major, n + gp->first_minor + 1,
disk_name(gp, n + 1, buf),
part_stat_read(hd, ios[0]),
part_stat_read(hd, merges[0]),
(unsigned long long)part_stat_read(hd, sectors[0]),
jiffies_to_msecs(part_stat_read(hd, ticks[0])),
part_stat_read(hd, ios[1]),
part_stat_read(hd, merges[1]),
(unsigned long long)part_stat_read(hd, sectors[1]),
jiffies_to_msecs(part_stat_read(hd, ticks[1])),
hd->in_flight,
jiffies_to_msecs(part_stat_read(hd, io_ticks)),
jiffies_to_msecs(part_stat_read(hd, time_in_queue))
);
}

return 0;
Expand Down

0 comments on commit d609035

Please sign in to comment.