qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC V2 07/16] qcow2: Collect undeduplicated cluster metric


From: Benoît Canet
Subject: [Qemu-devel] [RFC V2 07/16] qcow2: Collect undeduplicated cluster metric.
Date: Wed, 6 Feb 2013 13:32:10 +0100

---
 block/qcow2-dedup.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c
index 31988b6..454a94f 100644
--- a/block/qcow2-dedup.c
+++ b/block/qcow2-dedup.c
@@ -524,6 +524,7 @@ static int 
qcow2_count_next_non_dedupable_clusters(BlockDriverState *bs,
                                                    uint8_t *data,
                                                    int left_to_process)
 {
+    BDRVQcowState *s = bs->opaque;
     int i;
     int ret = 0;
     QCowHashNode *hash_node;
@@ -546,6 +547,7 @@ static int 
qcow2_count_next_non_dedupable_clusters(BlockDriverState *bs,
 
         qcow2_build_and_insert_hash_node(bs, &ds->phash.hash);
         add_hash_to_undedupable_list(bs, ds);
+        s->dedup_metrics.non_deduplicated_clusters++;
     }
 
     return i;
-- 
1.7.10.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]