qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC V2 15/16] qcow2: returns deduplication metrics and sta


From: Benoît Canet
Subject: [Qemu-devel] [RFC V2 15/16] qcow2: returns deduplication metrics and status via bdrv_get_info()
Date: Wed, 6 Feb 2013 13:32:18 +0100

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

diff --git a/block/qcow2.c b/block/qcow2.c
index 514811a..0ee5f4b 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1864,6 +1864,10 @@ static int qcow2_get_info(BlockDriverState *bs, 
BlockDriverInfo *bdi)
     BDRVQcowState *s = bs->opaque;
     bdi->cluster_size = s->cluster_size;
     bdi->vm_state_offset = qcow2_vm_state_offset(s);
+    bdi->has_dedup = s->has_dedup;
+    bdi->dedup_status = s->dedup_status;
+    qcow2_dedup_update_metrics(bs);
+    memcpy(&bdi->dedup_metrics, &s->dedup_metrics, sizeof(bdi->dedup_metrics));
     return 0;
 }
 
-- 
1.7.10.4




reply via email to

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