[libvirt] [PATCH 03/30] storagefile: qcow1: Fix check for empty backing file

Michal Privoznik mprivozn at redhat.com
Fri Oct 11 13:05:51 UTC 2019


On 10/9/19 9:26 PM, Daniel Henrique Barboza wrote:
> 
> 
> On 10/7/19 6:49 PM, Cole Robinson wrote:
>> >From f772b3d91fd the intention of this code seems to be to set
> 
> Is this leading '>' a bogus?

That's a feature of git-send-email so that this line is not mistaken for 
e-mail header line "From: Michal Privoznik ....". When Cole pushes these 
patches, it won't appear in git log, nor it shows in his local branch.

> 
>> format=NONE when the image does not have a backing file. However
>> 'buf' here is the whole qcow1 file header. What we want to be
>> checking is 'res' which is the parsed backing file path.
>> qcowXGetBackingStore sets this to NULL when there's no backing file.
>>
>> Signed-off-by: Cole Robinson <crobinso at redhat.com>
>> ---
> 
> This is unusual. Either the qcow file header 'buf' is being set to \0 when
> there is no backing file (which would make the current code work even
> when checking the wrong thing) or this is a bug that flew under the radar
> from a long time.
> 

Since this is for qcow1 I wouldn't be surprised if it is the latter one. 
I mean, does anybody even use qcow1 these days?

Michal




More information about the libvir-list mailing list