Patchwork [RFC,V5,38/62] qcow2: Initialize deduplication metrics.

login
register
mail settings
Submitter Benoît Canet
Date Jan. 16, 2013, 3:48 p.m.
Message ID <1358351321-4891-39-git-send-email-benoit@irqsave.net>
Download mbox | patch
Permalink /patch/212895/
State New
Headers show

Comments

Benoît Canet - Jan. 16, 2013, 3:48 p.m.
---
 block/qcow2-dedup.c |    2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c
index 6cd1af4..997714b 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) {