From mboxrd@z Thu Jan 1 00:00:00 1970 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 From: Kevin Wolf 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> Subject: [Qemu-devel] [PATCH 14/18] qcow2: Remove abort on free_clusters failure List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@linux.vnet.ibm.com Cc: kwolf@redhat.com, qemu-devel@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 */ } } -- 1.6.6.1