From patchwork Fri Apr 30 14:00:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 51343 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 77DCEB7D2D for ; Sat, 1 May 2010 00:30:30 +1000 (EST) Received: from localhost ([127.0.0.1]:46996 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7rDE-0006xT-H7 for incoming@patchwork.ozlabs.org; Fri, 30 Apr 2010 10:29:04 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7qnc-0007iA-Al for qemu-devel@nongnu.org; Fri, 30 Apr 2010 10:02:36 -0400 Received: from [140.186.70.92] (port=55266 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7qnb-0007hJ-4I for qemu-devel@nongnu.org; Fri, 30 Apr 2010 10:02:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7qnZ-0000Uv-ED for qemu-devel@nongnu.org; Fri, 30 Apr 2010 10:02:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33517) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7qnZ-0000Un-5x for qemu-devel@nongnu.org; Fri, 30 Apr 2010 10:02:33 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3UE2NnS029211 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 30 Apr 2010 10:02:23 -0400 Received: from localhost.localdomain (vpn1-6-55.ams2.redhat.com [10.36.6.55]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3UE14sD007196; Fri, 30 Apr 2010 10:02:13 -0400 From: Kevin Wolf To: aliguori@linux.vnet.ibm.com Date: Fri, 30 Apr 2010 16:00:36 +0200 Message-Id: <1272636040-17374-15-git-send-email-kwolf@redhat.com> In-Reply-To: <1272636040-17374-1-git-send-email-kwolf@redhat.com> References: <1272636040-17374-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 14/18] qcow2: Remove abort on free_clusters failure 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 While it's true that during regular operation free_clusters failure would be a bug, an I/O error can always happen. There's no need to kill the VM, the worst thing that can happen (and it will) is that we leak some clusters. Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 95491d3..744107c 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -638,7 +638,7 @@ void qcow2_free_clusters(BlockDriverState *bs, ret = update_refcount(bs, offset, size, -1); if (ret < 0) { fprintf(stderr, "qcow2_free_clusters failed: %s\n", strerror(-ret)); - abort(); + /* TODO Remember the clusters to free them later and avoid leaking */ } }