diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 08:53:00 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-28 08:53:00 -0700 |
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 0f64ee7d8d2..ac31ea17005 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) { unsigned long now = jiffies; - __disk_stat_add(disk, time_in_queue, - disk->in_flight * (now - disk->stamp)); - disk->stamp = now; + if (now == disk->stamp) + return; - if (disk->in_flight) - __disk_stat_add(disk, io_ticks, (now - disk->stamp_idle)); - disk->stamp_idle = now; + if (disk->in_flight) { + __disk_stat_add(disk, time_in_queue, + disk->in_flight * (now - disk->stamp)); + __disk_stat_add(disk, io_ticks, (now - disk->stamp)); + } + disk->stamp = now; } /* |