[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC PATCH 10/10] block: x-blockdev-create QMP command
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [RFC PATCH 10/10] block: x-blockdev-create QMP command |
Date: |
Tue, 16 Jan 2018 14:06:27 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 01/11/2018 01:52 PM, Kevin Wolf wrote:
> This adds a synchronous x-blockdev-create QMP command that can create
> qcow2 images on a given node name.
>
> We don't want to block while creating an image, so this is not the final
> interface in all aspects, but BlockdevCreateOptionsQcow2 and
> .bdrv_co_create() are what they actually might look like in the end. In
> any case, this should be good enough to test whether we interpret
> BlockdevCreateOptions as we should.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> qapi/block-core.json | 12 ++++++++++++
> include/block/block_int.h | 2 ++
> block.c | 48
> +++++++++++++++++++++++++++++++++++++++++++++++
> block/qcow2.c | 3 ++-
> 4 files changed, 64 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 9341f6708d..93357a4d5d 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -3415,6 +3415,18 @@
> } }
>
> ##
> +# @x-blockdev-create:
> +#
> +# Create an image format on a given node.
> +# TODO Replace with something asynchronous (block job?)
> +#
> +# Since: 2.12
> +##
> +{ 'command': 'x-blockdev-create',
> + 'data': 'BlockdevCreateOptions',
> + 'boxed': true }
> +
So simple, compared to all the prep work in earlier patches ;)
I like the approach. As you say, there's still more work before we can
remove the x- prefix, but I think you're headed on a good track.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [RFC PATCH 04/10] qcow2: Pass BlockdevCreateOptions to qcow2_create2(), (continued)
- [Qemu-devel] [RFC PATCH 06/10] qcow2: Use QCryptoBlockCreateOptions in qcow2_create2(), Kevin Wolf, 2018/01/11
- [Qemu-devel] [RFC PATCH 07/10] qcow2: Handle full/falloc preallocation in qcow2_create2(), Kevin Wolf, 2018/01/11
- [Qemu-devel] [RFC PATCH 08/10] util: Add qemu_opts_to_qdict_filtered(), Kevin Wolf, 2018/01/11
- [Qemu-devel] [RFC PATCH 09/10] qcow2: Use visitor for options in qcow2_create(), Kevin Wolf, 2018/01/11
- [Qemu-devel] [RFC PATCH 10/10] block: x-blockdev-create QMP command, Kevin Wolf, 2018/01/11
- Re: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2, no-reply, 2018/01/11
- Re: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2, no-reply, 2018/01/11
- Re: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2, Kevin Wolf, 2018/01/16
- Re: [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2, Max Reitz, 2018/01/29