qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC V7 27/32] qcow2: Add verification of dedup table.


From: Benoît Canet
Subject: [Qemu-devel] [RFC V7 27/32] qcow2: Add verification of dedup table.
Date: Fri, 15 Mar 2013 15:49:41 +0100

Signed-off-by: Benoit Canet <address@hidden>
---
 block/qcow2-refcount.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index af18f9b..58d142f 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -1253,6 +1253,15 @@ int qcow2_check_refcounts(BlockDriverState *bs, 
BdrvCheckResult *res,
         goto fail;
     }
 
+    if (s->has_dedup) {
+        ret = check_refcounts_l1(bs, res, refcount_table, nb_clusters,
+                                 s->dedup_table_offset, s->dedup_table_size,
+                                 0, true);
+        if (ret < 0) {
+            goto fail;
+        }
+    }
+
     /* snapshots */
     for(i = 0; i < s->nb_snapshots; i++) {
         sn = s->snapshots + i;
-- 
1.7.10.4




reply via email to

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