[Patch] blkiomon: fix min value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Martin Peschke <mpeschke@xxxxxxxxxxxxxxxxxx>
Reported-by: Stefan Raspl <raspl@xxxxxxxxxxxxxxxxxx>

A couple of min-counters weren't initialised correctly (thrput_r, thrput_w).
We have got a perfectly working init function for this purpose.
Removing partially duplicated code.

Signed-off-by: Martin Peschke <mpeschke@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Stefan Raspl <raspl@xxxxxxxxxxxxxxxxxx>
 
---
 blkiomon.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/blkiomon.c
+++ b/blkiomon.c
@@ -168,7 +168,7 @@ static struct dstat *blkiomon_alloc_dsta
 		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(
 		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]);


--
To unsubscribe from this list: send the line "unsubscribe linux-btrace" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux