From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O6i8v-0002ap-J8 for qemu-devel@nongnu.org; Tue, 27 Apr 2010 06:35:53 -0400 Received: from [140.186.70.92] (port=49035 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O6i8p-0002Y2-I6 for qemu-devel@nongnu.org; Tue, 27 Apr 2010 06:35:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O6i8n-0006LJ-Ms for qemu-devel@nongnu.org; Tue, 27 Apr 2010 06:35:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28859) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O6i8n-0006LA-Cf for qemu-devel@nongnu.org; Tue, 27 Apr 2010 06:35:45 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3RAZiWC028201 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 27 Apr 2010 06:35:44 -0400 From: Kevin Wolf Date: Tue, 27 Apr 2010 12:35:18 +0200 Message-Id: <1272364518-9386-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH] qcow2: Remove abort on free_clusters failure List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com 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