qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qcow2: Remove abort on free_clusters failure


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] qcow2: Remove abort on free_clusters failure
Date: Tue, 27 Apr 2010 14:56:56 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

Am 27.04.2010 14:52, schrieb Stefan Hajnoczi:
> On Tue, Apr 27, 2010 at 11:35 AM, Kevin Wolf <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]