summaryrefslogtreecommitdiff
path: root/block/genhd.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-11-09 13:38:47 +0100
committerJens Axboe <axboe@nelson.home.kernel.dk>2005-11-12 10:55:21 +0100
commit47a004103d663bbba8c7c433a710a86f44351cf3 (patch)
tree91bf9479fa43e7a13b02b2f6b957373b5b28b5ef /block/genhd.c
parentcff3ba2204a0797b05150a4b2b7f40a55023d952 (diff)
[BLOCK] Document the READ/WRITE splitup of the disk stats
Use the symbolic name where appropriate and add a comment to the disk_stats structure. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 54aec4a1ae13..f04609d553b8 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -391,12 +391,14 @@ static ssize_t disk_stats_read(struct gendisk * disk, char *page)
"%8u %8u %8llu %8u "
"%8u %8u %8u"
"\n",
- disk_stat_read(disk, ios[0]), disk_stat_read(disk, merges[0]),
- (unsigned long long)disk_stat_read(disk, sectors[0]),
- jiffies_to_msecs(disk_stat_read(disk, ticks[0])),
- disk_stat_read(disk, ios[1]), disk_stat_read(disk, merges[1]),
- (unsigned long long)disk_stat_read(disk, sectors[1]),
- jiffies_to_msecs(disk_stat_read(disk, ticks[1])),
+ disk_stat_read(disk, ios[READ]),
+ disk_stat_read(disk, merges[READ]),
+ (unsigned long long)disk_stat_read(disk, sectors[READ]),
+ jiffies_to_msecs(disk_stat_read(disk, ticks[READ])),
+ disk_stat_read(disk, ios[WRITE]),
+ disk_stat_read(disk, merges[WRITE]),
+ (unsigned long long)disk_stat_read(disk, sectors[WRITE]),
+ jiffies_to_msecs(disk_stat_read(disk, ticks[WRITE])),
disk->in_flight,
jiffies_to_msecs(disk_stat_read(disk, io_ticks)),
jiffies_to_msecs(disk_stat_read(disk, time_in_queue)));