Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 340e01248478ba8b78a6d4d1809b1eff > files > 657

kvm-83-270.el5_11.src.rpm

From f51718655f0b24907f07cf5e0532cdcb0060e07e Mon Sep 17 00:00:00 2001
From: Kevin Wolf <kwolf@redhat.com>
Date: Wed, 21 Apr 2010 09:44:36 -0300
Subject: [PATCH] qcow2: Remove abort on free_clusters failure

RH-Author: Kevin Wolf <kwolf@redhat.com>
Message-id: <patch-8757-clone-for-rhel5-rhel56>
Patchwork-id: 8795
O-Subject: [RHEL-5.6/5.5.z KVM PATCH] qcow2: Remove abort on free_clusters
	failure
Bugzilla: 583947
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
RH-Acked-by: Juan Quintela <quintela@redhat.com>
RH-Acked-by: Gleb Natapov <gleb@redhat.com>

Bugzilla: 583947
Upstream: Yet to submit

Adding an abort() for free_clusters failure was a stupid move. While it's true
that during regular operation this would be a bug (and there is a BZ open for
such a case), 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 <kwolf@redhat.com>
---
 qemu/block-qcow2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 qemu/block-qcow2.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu/block-qcow2.c b/qemu/block-qcow2.c
index 77fe0b4..642653e 100644
--- a/qemu/block-qcow2.c
+++ b/qemu/block-qcow2.c
@@ -2670,7 +2670,7 @@ static void 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.0.3