From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53440 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZ04n-0006Mo-GE for qemu-devel@nongnu.org; Wed, 14 Jul 2010 07:24:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZ04l-0001Q2-DA for qemu-devel@nongnu.org; Wed, 14 Jul 2010 07:24:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34474) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZ04l-0001Pe-6Y for qemu-devel@nongnu.org; Wed, 14 Jul 2010 07:24:31 -0400 From: Kevin Wolf Date: Wed, 14 Jul 2010 13:24:03 +0200 Message-Id: <1279106653-24351-5-git-send-email-kwolf@redhat.com> In-Reply-To: <1279106653-24351-1-git-send-email-kwolf@redhat.com> References: <1279106653-24351-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [STABLE][PATCH 04/14] qcow2: Remove abort on free_clusters failure List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aurelien@aurel32.net 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 (cherry picked from commit 003fad6e2cae5311d3aea996388c90e3ab17de90) --- 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 465d5d3..ff2cf6d 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -631,7 +631,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.7.1.1