[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 06/12] block: make 'top' argument to block-commit optional, (continued)
- [Qemu-devel] [PATCH v3 06/12] block: make 'top' argument to block-commit optional, Jeff Cody, 2014/05/30
- [Qemu-devel] [PATCH v3 07/12] block: Accept node-name arguments for block-commit, Jeff Cody, 2014/05/30
- [Qemu-devel] [PATCH v3 08/12] block: extend block-commit to accept a string for the backing file, Jeff Cody, 2014/05/30
- [Qemu-devel] [PATCH v3 10/12] block: add backing-file option to block-stream, Jeff Cody, 2014/05/30
- [Qemu-devel] [PATCH v3 09/12] block: add ability for block-stream to use node-name, Jeff Cody, 2014/05/30
- [Qemu-devel] [PATCH v3 11/12] block: Add QMP documentation for block-stream, Jeff Cody, 2014/05/30
- [Qemu-devel] [PATCH v3 12/12] block: add QAPI command to allow live backing file change, Jeff Cody, 2014/05/30
- Re: [Qemu-devel] [PATCH v3 12/12] block: add QAPI command to allow live backing file change,
Eric Blake <=