Re: [PATCH for 1.2.6] qemu: copy: Accept 'format' parameter when copying to a non-existing img

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

 



On 07/01/2014 09:31 AM, Peter Krempa wrote:
> We have the following matrix of possible arguments handled by the logic
> statement touched by this patch:
>        | flags & _REUSE_EXT | !(flags & _REUSE_EXT)
> -------+--------------------+----------------------
>  format| (1)                | (2)
> -------+--------------------+----------------------
> !format| (3)                | (4)
> -------+--------------------+----------------------
> 
> In cases 1 and 2 the user provided a format, in cases 3 and 4 not. The
> user requests to use a pre-existing image in 1 and 3 and libvirt shall

s/shall/will/

> create a new image in 2 and 4.
> 
> The difference between cases 3 and 4 is that for 3 the format is probed
> from the user-provided image, whereas in 4 we just use the existing disk
> format.

With the further caveat that if the _SHALLOW flag was requested, we are
guaranteed the probe is safe (a shallow image implies a backing file,
but raw cannot have a backing file, and probing is only a security hole
if raw is probed)

> 
> The current code would treat cases 1,3 and 4 correctly but in case 2 the
> format provided by the user would be ignored.
> 
> The particular piece of code was broken in commit 35c7701c64508f975dfeb8
> but since it was introduced a few commits before that it was never
> released as working.
> ---
>  src/qemu/qemu_driver.c | 37 +++++++++++++++++++++----------------
>  1 file changed, 21 insertions(+), 16 deletions(-)

ACK.  I'll take care of pushing the fix to the affected maint branches,
but yours needs to go in for 1.2.6.

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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]