[RFC,V2,04/16] qcow2: Initialize deduplication metrics.

Submitted by Benoît Canet on Feb. 6, 2013, 12:32 p.m.

Details

Message ID 1360153939-9563-5-git-send-email-benoit@irqsave.net
State New
Headers show

Commit Message

Benoît Canet Feb. 6, 2013, 12:32 p.m.
---
 block/qcow2-dedup.c |    2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c
index cd08594..868caec 100644
--- a/block/qcow2-dedup.c
+++ b/block/qcow2-dedup.c
@@ -1272,6 +1272,8 @@  int qcow2_dedup_init(BlockDriverState *bs)
 
     s->has_dedup = true;
 
+    memset(&s->dedup_metrics, 0, sizeof(s->dedup_metrics));
+
     ret = qcow2_dedup_alloc(bs);
 
     if (ret < 0) {