Patchwork [RFC,V2,08/16] qcow2: Count QCowHashNode creation metrics.

login
register
mail settings
Submitter Benoît Canet
Date Feb. 6, 2013, 12:32 p.m.
Message ID <1360153939-9563-9-git-send-email-benoit@irqsave.net>
Download mbox | patch
Permalink /patch/218650/
State New
Headers show

Comments

Benoît Canet - Feb. 6, 2013, 12:32 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 454a94f..5a79906 100644
--- a/block/qcow2-dedup.c
+++ b/block/qcow2-dedup.c
@@ -289,6 +289,7 @@  static void qcow2_build_and_insert_hash_node(BlockDriverState *bs,
                                                  QCOW_FLAG_EMPTY,
                                                  QCOW_FLAG_EMPTY);
     g_tree_insert(s->dedup_tree_by_hash, &hash_node->hash, hash_node);
+    s->dedup_metrics.ram_hash_creations++;
 }
 
 /*
@@ -1043,6 +1044,7 @@  static void qcow2_dedup_insert_hash_node(BlockDriverState *bs,
 
     g_tree_insert(s->dedup_tree_by_hash, &hash_node->hash, hash_node);
     g_tree_insert(s->dedup_tree_by_sect, &hash_node->physical_sect, hash_node);
+    s->dedup_metrics.ram_hash_creations++;
 }
 
 /* This load the QCowHashNode corresponding to a given cluster index into ram