qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 12/12] block: add QAPI command to allow live


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v3 12/12] block: add QAPI command to allow live backing file change
Date: Fri, 30 May 2014 15:34:37 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

On 05/30/2014 11:35 AM, Jeff Cody wrote:
> This allows a user to make a live change to the backing file recorded in
> an open image.
> 
> The image file to modify can be specified 2 ways:
> 
> 1) 'device' string, and image filename
> 2) image node-name
> 
> Note: this does not cause the backing file itself to be reopened; it
> merely changes the backing filename in the image file structure, and
> in internal BDS structures.
> 
> It is the responsibility of the user to pass a filename string that
> can be resolved when the image chain is reopened, and the filename
> string is not validated.
> 
> A good analogy for this command is that it is a live version of
> 'qemu-img rebase -u', with respect to changing the backing file string.
> 
> Signed-off-by: Jeff Cody <address@hidden>
> ---
>  blockdev.c       | 122 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  qapi-schema.json |  65 +++++++++++++++++++++++++++++
>  qmp-commands.hx  |  78 +++++++++++++++++++++++++++++++++++
>  3 files changed, 265 insertions(+)
> 
> +
> +    ret = bdrv_change_backing_file(image_bs, backing_file,
> +                               image_bs->drv ? image_bs->drv->format_name : 
> "");

I'm guessing the odd indentation here was caused by a desire to fit in
80 columns, so it doesn't negatively affect the review.

So much easier without HMP to worry about :)

Reviewed-by: Eric Blake <address@hidden>

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