diff options
author | Jens Axboe <axboe@suse.de> | 2005-11-09 07:38:47 -0500 |
---|---|---|
committer | Jens Axboe <axboe@nelson.home.kernel.dk> | 2005-11-12 04:55:21 -0500 |
commit | 47a004103d663bbba8c7c433a710a86f44351cf3 (patch) | |
tree | 91bf9479fa43e7a13b02b2f6b957373b5b28b5ef | |
parent | cff3ba2204a0797b05150a4b2b7f40a55023d952 (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>
-rw-r--r-- | block/genhd.c | 14 | ||||
-rw-r--r-- | include/linux/genhd.h | 4 |
2 files changed, 10 insertions, 8 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) | |||
391 | "%8u %8u %8llu %8u " | 391 | "%8u %8u %8llu %8u " |
392 | "%8u %8u %8u" | 392 | "%8u %8u %8u" |
393 | "\n", | 393 | "\n", |
394 | disk_stat_read(disk, ios[0]), disk_stat_read(disk, merges[0]), | 394 | disk_stat_read(disk, ios[READ]), |
395 | (unsigned long long)disk_stat_read(disk, sectors[0]), | 395 | disk_stat_read(disk, merges[READ]), |
396 | jiffies_to_msecs(disk_stat_read(disk, ticks[0])), | 396 | (unsigned long long)disk_stat_read(disk, sectors[READ]), |
397 | disk_stat_read(disk, ios[1]), disk_stat_read(disk, merges[1]), | 397 | jiffies_to_msecs(disk_stat_read(disk, ticks[READ])), |
398 | (unsigned long long)disk_stat_read(disk, sectors[1]), | 398 | disk_stat_read(disk, ios[WRITE]), |
399 | jiffies_to_msecs(disk_stat_read(disk, ticks[1])), | 399 | disk_stat_read(disk, merges[WRITE]), |
400 | (unsigned long long)disk_stat_read(disk, sectors[WRITE]), | ||
401 | jiffies_to_msecs(disk_stat_read(disk, ticks[WRITE])), | ||
400 | disk->in_flight, | 402 | disk->in_flight, |
401 | jiffies_to_msecs(disk_stat_read(disk, io_ticks)), | 403 | jiffies_to_msecs(disk_stat_read(disk, io_ticks)), |
402 | jiffies_to_msecs(disk_stat_read(disk, time_in_queue))); | 404 | jiffies_to_msecs(disk_stat_read(disk, time_in_queue))); |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 8eeaa53a68c9..eef5ccdcd731 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -78,7 +78,7 @@ struct hd_struct { | |||
78 | sector_t start_sect; | 78 | sector_t start_sect; |
79 | sector_t nr_sects; | 79 | sector_t nr_sects; |
80 | struct kobject kobj; | 80 | struct kobject kobj; |
81 | unsigned ios[2], sectors[2]; | 81 | unsigned ios[2], sectors[2]; /* READs and WRITEs */ |
82 | int policy, partno; | 82 | int policy, partno; |
83 | }; | 83 | }; |
84 | 84 | ||
@@ -89,7 +89,7 @@ struct hd_struct { | |||
89 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 | 89 | #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 |
90 | 90 | ||
91 | struct disk_stats { | 91 | struct disk_stats { |
92 | unsigned sectors[2]; | 92 | unsigned sectors[2]; /* READs and WRITEs */ |
93 | unsigned ios[2]; | 93 | unsigned ios[2]; |
94 | unsigned merges[2]; | 94 | unsigned merges[2]; |
95 | unsigned ticks[2]; | 95 | unsigned ticks[2]; |