| Submitter | Benoît Canet |
|---|---|
| Date | Jan. 16, 2013, 4:24 p.m. |
| Message ID | <1358353508-5369-5-git-send-email-benoit@irqsave.net> |
| Download | mbox | patch |
| Permalink | /patch/212856/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index e4920d4..716371c 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -400,10 +400,14 @@ static int qcow2_deduplicate_cluster(BlockDriverState *bs, } /* Increment the refcount of the cluster */ - return update_refcount(bs, - (hash_node->physical_sect / - s->cluster_sectors) << s->cluster_bits, - 1, 1, true); + ret = update_refcount(bs, + (hash_node->physical_sect / + s->cluster_sectors) << s->cluster_bits, + 1, 1, true); + + s->dedup_metrics.deduplicated_clusters++; + + return ret; } /* This function tries to deduplicate a given cluster.