qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] qcow2: Check L1/L2/reftable entries for ali


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 4/4] qcow2: Check L1/L2/reftable entries for alignment
Date: Thu, 21 Aug 2014 06:24:15 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0

On 08/21/2014 02:14 AM, Kevin Wolf wrote:

>>>> +            if (offset_into_cluster(s, l2_entry & L2E_OFFSET_MASK)) {
>>>> +                fprintf(stderr, "qcow2: Cannot free unaligned cluster 
>>>> %#llx\n",
>>>> +                        l2_entry & L2E_OFFSET_MASK);
>>>> +            } else {
>>>> +                qcow2_free_clusters(bs, l2_entry & L2E_OFFSET_MASK,
>>>> +                                    nb_clusters << s->cluster_bits, type);
>>>> +            }
>>> Hm... Why isn't this a corruption like any other? Unconditional
>>> fprintf() is something I don't like a lot.
>>
>> We already do it in qcow2_free_clusters().
>>
>> I decided not to make it a corruption because we don't lose
>> anything. The entry is corrupted, but we don't need it anymore
>> anyway; it's overwritten with 0 and wherever the cluster might have
>> been meant to be located, it doesn't matter anymore.
> 
> I can see your point. This is a tough one: On the one hand, it is
> undoubtedly corruption, and usually there is not just one corrupted
> entry, so you want the user to check the image. On the other hand, yes,
> this is merely a cluster leak and breaking the VM for that might be a
> bit too much.
> 
> Still just printing a line on stderr and continuing otherwise doesn't
> feel quite right, the user will usually miss the message because it ends
> up in the log of a seemingly well working guest and if printed
> unconditionally, it may still flood the logs.
> 
> Eric, would management be able to make something useful out of this if
> we sent a QMP event?

Libvirt could certainly expose a QMP event to upper layers (oVirt, VDSM,
OpenStack, ...) for them to be made aware that "your image had a
non-fatal corruption, you may want to check if there are other problems
going on".  I don't think libvirt would do anything in particular with
this knowledge beyond passthrough, but it does sound like a reasonable
event to add.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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