From 9ec3011dba3ce406955eb68a30e19e6d66989432 Mon Sep 17 00:00:00 2001 From: Kevin Wolf <kwolf@redhat.com> Date: Thu, 24 Jun 2010 14:47:59 -0300 Subject: [PATCH 3/5] qcow2: Don't try to check tables that couldn't be loaded RH-Author: Kevin Wolf <kwolf@redhat.com> Message-id: <1277390879-11484-3-git-send-email-kwolf@redhat.com> Patchwork-id: 10185 O-Subject: [RHEL-5.6 KVM PATCH 2/2] qcow2: Don't try to check tables that couldn't be loaded Bugzilla: 606434 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