diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 11:53:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 11:53:00 -0400 |
commit | 0ee40c6628434f0535da31deeacc28b61e80d810 (patch) | |
tree | 2873b9c932a63943fad22617b8385866e45347f5 /drivers/block/ll_rw_blk.c | |
parent | 236fa08168dd82af29a76c31c40b4148403774c0 (diff) | |
parent | 2824bc9328467127083c1325f54b67d298c333b2 (diff) |
Merge branch 'for-linus' of git://brick.kernel.dk/data/git/linux-2.6-block
Diffstat (limited to 'drivers/block/ll_rw_blk.c')
-rw-r--r-- | drivers/block/ll_rw_blk.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c index 0f64ee7d8d27..ac31ea170058 100644 --- a/drivers/block/ll_rw_blk.c +++ b/drivers/block/ll_rw_blk.c | |||
@@ -2433,13 +2433,15 @@ void disk_round_stats(struct gendisk *disk) | |||
2433 | { | 2433 | { |
2434 | unsigned long now = jiffies; | 2434 | unsigned long now = jiffies; |
2435 | 2435 | ||
2436 | __disk_stat_add(disk, time_in_queue, | 2436 | if (now == disk->stamp) |
2437 | disk->in_flight * (now - disk->stamp)); | 2437 | return; |
2438 | disk->stamp = now; | ||
2439 | 2438 | ||
2440 | if (disk->in_flight) | 2439 | if (disk->in_flight) { |
2441 | __disk_stat_add(disk, io_ticks, (now - disk->stamp_idle)); | 2440 | __disk_stat_add(disk, time_in_queue, |
2442 | disk->stamp_idle = now; | 2441 | disk->in_flight * (now - disk->stamp)); |
2442 | __disk_stat_add(disk, io_ticks, (now - disk->stamp)); | ||
2443 | } | ||
2444 | disk->stamp = now; | ||
2443 | } | 2445 | } |
2444 | 2446 | ||
2445 | /* | 2447 | /* |