Patchwork [RFC,V2,11/16] qcow2: Count deduplication refcount overflow metric.

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

Comments

Benoît Canet - Feb. 6, 2013, 12:32 p.m.
---
 block/qcow2-dedup.c |    1 +
 1 file changed, 1 insertion(+)
Eric Blake - Feb. 7, 2013, 3:37 p.m.
On 02/06/2013 05:32 AM, Benoît Canet wrote:
> ---
>  block/qcow2-dedup.c |    1 +
>  1 file changed, 1 insertion(+)

It wouldn't hurt to squash several of these one-liner patches into a
bigger patch that turns on collection of all stats in one go.

> 
> diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c
> index e159e77..308b4f6 100644
> --- a/block/qcow2-dedup.c
> +++ b/block/qcow2-dedup.c
> @@ -1024,6 +1024,7 @@ void qcow2_dedup_refcount_half_max_reached(BlockDriverState *bs,
>  
>      /* remove the QCowHashNode from ram so we won't use it anymore for dedup */
>      qcow2_remove_hash_node(bs, hash_node);
> +    s->dedup_metrics.refcount_overflows++;
>  }
>  
>  bool qcow2_dedup_is_running(BlockDriverState *bs)
>

Patch

diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c
index e159e77..308b4f6 100644
--- a/block/qcow2-dedup.c
+++ b/block/qcow2-dedup.c
@@ -1024,6 +1024,7 @@  void qcow2_dedup_refcount_half_max_reached(BlockDriverState *bs,
 
     /* remove the QCowHashNode from ram so we won't use it anymore for dedup */
     qcow2_remove_hash_node(bs, hash_node);
+    s->dedup_metrics.refcount_overflows++;
 }
 
 bool qcow2_dedup_is_running(BlockDriverState *bs)