qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 5/5] block: extend block-commit to accept a stri


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 5/5] block: extend block-commit to accept a string for the backing file
Date: Thu, 15 May 2014 06:57:11 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/15/2014 06:26 AM, Benoît Canet wrote:
> The Wednesday 14 May 2014 à 23:20:19 (-0400), Jeff Cody wrote :
>> On some image chains, QEMU may not always be able to resolve the
>> filenames properly, when updating the backing file of an image
>> after a block commit.
>>

>>      } else {
>>          commit_start(bs, base_bs, top_bs, speed, on_error, block_job_cb, bs,
>> -                    &local_err);
>> +                     backing_file, &local_err);
> 
> I don't know QAPI well enough to be sure but are we certain that if 
> has_backing_file == false then backing_file == NULL and not some
> random pointer ?
> 
> If am thinking to add has_backing_file ? backing_file : NULL here.

We are moving towards having qapi guarantee sane defaults for FOO when
has_FOO is false; but aren't there yet.  You are correct that this needs
to guarantee that we aren't passing random memory.

-- 
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]