From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGVzh-0002tR-21 for qemu-devel@nongnu.org; Fri, 15 Mar 2013 10:52:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGVzZ-0005JQ-RH for qemu-devel@nongnu.org; Fri, 15 Mar 2013 10:52:28 -0400 Received: from nodalink.pck.nerim.net ([62.212.105.220]:59646 helo=paradis.irqsave.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGVzZ-0005JD-HT for qemu-devel@nongnu.org; Fri, 15 Mar 2013 10:52:21 -0400 From: =?UTF-8?q?Beno=C3=AEt=20Canet?= Date: Fri, 15 Mar 2013 15:49:41 +0100 Message-Id: <1363358986-8360-28-git-send-email-benoit@irqsave.net> In-Reply-To: <1363358986-8360-1-git-send-email-benoit@irqsave.net> References: <1363358986-8360-1-git-send-email-benoit@irqsave.net> Subject: [Qemu-devel] [RFC V7 27/32] qcow2: Add verification of dedup table. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, =?UTF-8?q?Beno=C3=AEt=20Canet?= , stefanha@redhat.com Signed-off-by: Benoit Canet --- 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