Fix queued vs dispatch numbers
authorJens Axboe <jens.axboe@oracle.com>
Mon, 21 May 2007 08:16:59 +0000 (10:16 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 21 May 2007 08:16:59 +0000 (10:16 +0200)
A merge trace includes a queue trace. blkparse accounted both
of them, resulting in the queued transfer number being a lot
larger than it should be. Fix that by not accounting bytes
in the merge handling.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
blkparse.c

index 3557aaac0610e35b66caae0fcb5a6c1c74eaf0db..c205c51af71dd8100a06ef3fe0c4882f71ffa136 100644 (file)
@@ -1144,27 +1144,23 @@ static void check_time(struct per_dev_info *pdi, struct blk_io_trace *bit)
        pdi->last_reported_time = this;
 }
 
-static inline void __account_m(struct io_stats *ios, struct blk_io_trace *t,
-                              int rw)
+static inline void __account_m(struct io_stats *ios, int rw)
 {
-       if (rw) {
+       if (rw)
                ios->mwrites++;
-               ios->qwrite_kb += t_kb(t);
-       } else {
+       else
                ios->mreads++;
-               ios->qread_kb += t_kb(t);
-       }
 }
 
 static inline void account_m(struct blk_io_trace *t, struct per_cpu_info *pci,
                             int rw)
 {
-       __account_m(&pci->io_stats, t, rw);
+       __account_m(&pci->io_stats, rw);
 
        if (per_process_stats) {
                struct io_stats *ios = find_process_io_stats(t->pid);
 
-               __account_m(ios, t, rw);
+               __account_m(ios, rw);
        }
 }