qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qcow2: Remove abort on free_clusters failure
Date: Tue, 27 Apr 2010 14:56:56 +0200	[thread overview]
Message-ID: <4BD6DF18.5010907@redhat.com> (raw)
In-Reply-To: <j2rfbd9d3991004270552g4f58c7b1u2c590da066c2e044@mail.gmail.com>

Am 27.04.2010 14:52, schrieb Stefan Hajnoczi:
> On Tue, Apr 27, 2010 at 11:35 AM, Kevin Wolf <kwolf@redhat.com> wrote:
>> --- 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 */
>>     }
>>  }
> 
> Has there been discussion on a fix mode for qemu-img check?  For qcow2
> it could write new refcounts, calculated by traversing the L1/L2
> tables of the image and snapshots.  Perhaps it would also dump out the
> orphaned clusters to a lost+found.

No real discussion, but it's somewhere among the low priority tasks on
my todo list. So I agree this would make sense, at least for the trivial
errors.

Another thing I was considering is to distinguish between errors and
warnings in qemu-img check. I keep getting reports about image
corruption which turn out to be just some leaked clusters because they
killed their qemu process at some point.

Kevin

      reply	other threads:[~2010-04-27 12:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BD6DF18.5010907@redhat.com \
    --to=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).