From 7640b8e8ec4cb521d9925222a5bada0ad2fb400c Mon Sep 17 00:00:00 2001 From: Kevin Wolf <kwolf@redhat.com> Date: Thu, 24 Jun 2010 14:47:59 -0300 Subject: [PATCH 2/4] qcow2: Don't try to check tables that couldn't be loaded RH-Author: Kevin Wolf <kwolf@redhat.com> Message-id: <patch-10185-clone-for-rhel55-rhel55> Patchwork-id: 10241 O-Subject: [RHEL-5.6 KVM PATCH 2/2] qcow2: Don't try to check tables that couldn't be loaded Bugzilla: 610342 RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com> RH-Acked-by: Christoph Hellwig <chellwig@redhat.com> RH-Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Bugzilla: 606434 Upstream commit: f74550fd53598ac6529dbcfc3c06e98d2d7fbe51 Trying to check them leads to a second error message which is more confusing than helpful: Can't get refcount for cluster 0: Invalid argument ERROR cluster 0 refcount=-22 reference=1 Signed-off-by: Kevin Wolf <kwolf@redhat.com> --- qemu/block-qcow2.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- qemu/block-qcow2.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/block-qcow2.c b/qemu/block-qcow2.c index 4556a6b..913679f 100644 --- a/qemu/block-qcow2.c +++ b/qemu/block-qcow2.c @@ -3394,6 +3394,7 @@ static int check_refcounts(BlockDriverState *bs) if (refcount1 < 0) { fprintf(stderr, "Can't get refcount for cluster %d: %s\n", i, strerror(-refcount1)); + continue; } refcount2 = refcount_table[i]; -- 1.7.0.3