A couple of min-counters weren't initialised correctly (thrput_r,
authorMartin Peschke <mpeschke@linux.vnet.ibm.com>
Wed, 21 Jan 2009 13:58:35 +0000 (14:58 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 21 Jan 2009 13:58:35 +0000 (14:58 +0100)
thrput_w).
We have got a perfectly working init function for this purpose.
Removing partially duplicated code.

Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
blkiomon.c

index 2066006c9a5ff58efbd28e3ab103891d08f8fee9..c3c1b114908133287055d63cc28ee57725e7617c 100644 (file)
@@ -168,7 +168,7 @@ static struct dstat *blkiomon_alloc_dstat(void)
                return NULL;
        }
 
-       memset(dstat, 0, sizeof(*dstat));
+       blkiomon_stat_init(&dstat->msg.stat);
        return dstat;
 }
 
@@ -211,10 +211,6 @@ static struct dstat *blkiomon_get_dstat(__u32 device)
                goto out;
 
        dstat->msg.stat.device = device;
-       dstat->msg.stat.size_r.min = -1ULL;
-       dstat->msg.stat.size_w.min = -1ULL;
-       dstat->msg.stat.d2c_r.min = -1ULL;
-       dstat->msg.stat.d2c_w.min = -1ULL;
 
        rb_link_node(&dstat->node, search.parent, search.node_ptr);
        rb_insert_color(&dstat->node, &dstat_tree[dstat_curr]);