qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qcow2: Remove abort on free_clusters failure
@ 2010-04-27 10:35 Kevin Wolf
  2010-04-27 12:52 ` Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Wolf @ 2010-04-27 10:35 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf

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 <kwolf@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-27 12:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-27 10:35 [Qemu-devel] [PATCH] qcow2: Remove abort on free_clusters failure Kevin Wolf
2010-04-27 12:52 ` Stefan Hajnoczi
2010-04-27 12:56   ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).