[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [RFC PATCH 10/10] block: x-blockdev-create QMP command
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [RFC PATCH 10/10] block: x-blockdev-create QMP command |
Date: |
Wed, 17 Jan 2018 18:50:29 +0100 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
Am 11.01.2018 um 20:52 hat Kevin Wolf geschrieben:
> 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?)
I just realised that this won't be a block job. It will be a job without
block, because there isn't necessarily any BlockDriverState involved
(when you create the protocol layer).
So it looks like my first job there is to make block jobs work with
bs == NULL... Or actually, we should probably try and do the proper
thing with the whole new job API that we were planning anyway?
Kevin
- [Qemu-block] [RFC PATCH 06/10] qcow2: Use QCryptoBlockCreateOptions in qcow2_create2(), (continued)
- [Qemu-block] [RFC PATCH 06/10] qcow2: Use QCryptoBlockCreateOptions in qcow2_create2(), Kevin Wolf, 2018/01/11
- [Qemu-block] [RFC PATCH 07/10] qcow2: Handle full/falloc preallocation in qcow2_create2(), Kevin Wolf, 2018/01/11
- [Qemu-block] [RFC PATCH 08/10] util: Add qemu_opts_to_qdict_filtered(), Kevin Wolf, 2018/01/11
- [Qemu-block] [RFC PATCH 09/10] qcow2: Use visitor for options in qcow2_create(), Kevin Wolf, 2018/01/11
- [Qemu-block] [RFC PATCH 10/10] block: x-blockdev-create QMP command, Kevin Wolf, 2018/01/11
- Re: [Qemu-block] [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2, no-reply, 2018/01/11
- Re: [Qemu-block] [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2, no-reply, 2018/01/11
- Re: [Qemu-block] [RFC PATCH 00/10] x-blockdev-create for qcow2, Kevin Wolf, 2018/01/16
- Re: [Qemu-block] [RFC PATCH 00/10] x-blockdev-create for qcow2, Max Reitz, 2018/01/29