From patchwork Tue Jun 22 10:37:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 56454 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 768D8B6EF3 for ; Tue, 22 Jun 2010 20:41:39 +1000 (EST) Received: from localhost ([127.0.0.1]:52746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OR0vA-0000Nf-Ai for incoming@patchwork.ozlabs.org; Tue, 22 Jun 2010 06:41:36 -0400 Received: from [140.186.70.92] (port=46925 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OR0rq-0008Bv-EX for qemu-devel@nongnu.org; Tue, 22 Jun 2010 06:38:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OR0ro-0000N6-KC for qemu-devel@nongnu.org; Tue, 22 Jun 2010 06:38:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21553) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OR0ro-0000Mp-DY for qemu-devel@nongnu.org; Tue, 22 Jun 2010 06:38:08 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5MAc7Jk014394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 22 Jun 2010 06:38:07 -0400 Received: from localhost.localdomain (dhcp-5-217.str.redhat.com [10.32.5.217]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5MAc3UR002687; Tue, 22 Jun 2010 06:38:06 -0400 From: Kevin Wolf To: qemu-devel@nongnu.org Date: Tue, 22 Jun 2010 12:37:55 +0200 Message-Id: <1277203075-8239-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1277203075-8239-1-git-send-email-kwolf@redhat.com> References: <1277203075-8239-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com Subject: [Qemu-devel] [PATCH 2/2] qcow2: Don't try to check tables that couldn't be loaded X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- block/qcow2-refcount.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index cedf57e..4a96d98 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -1174,6 +1174,7 @@ int qcow2_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];