Skip to content

RFC x-blockdev-create for qcow2

Kevin Wolf qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 29 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10block/qapi: Introduce BlockdevCreateOptionsqapi/block-core.json+64 -02 replies
2/10block/qapi: Add qcow2 create options to schemaqapi/block-core.json+32 -111 replies
3/10qcow2: Let qcow2_create() handle protocol layerblock/qcow2.c+38 -261 reply
4/10qcow2: Pass BlockdevCreateOptions to qcow2_create2()block/qcow2.c+148 -384 replies
5/10qcow2: Use BlockdevRef in qcow2_create2()block.c block/qcow2.c include/block/block.h+61 -123 replies
6/10qcow2: Use QCryptoBlockCreateOptions in qcow2_create2()block/qcow2.c+45 -171 reply
7/10qcow2: Handle full/falloc preallocation in qcow2_create2()block/qcow2.c+19 -91 reply
8/10util: Add qemu_opts_to_qdict_filtered()include/qemu/option.h util/qemu-option.c+27 -31 reply
9/10qcow2: Use visitor for options in qcow2_create()block/qcow2.c tests/qemu-iotests/049.out+93 -1441 reply
10/10block: x-blockdev-create QMP commandblock.c block/qcow2.c include/block/block_int.h +1 more+64 -12 replies

Reviews trailers per patch

5 of 10 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/10
2/10
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Qemu-devel] [RFC PATCH 00/10] x-blockdev-create for qcow2

This series implements a minimal QMP command that allows to create an image format on a given block node. The interface is still going to change to some kind of an async command (possibly a block job), so I prefixed x- for now.

At this point, I'm mostly interested in comments about BlockdevCreateOptions in the schema, the .bdrv_co_create callback and the way that legacy .bdrv_create is implemented in qcow2 now.

It looks to me as if we will have to keep .bdrv_create in addition to the new .bdrv_co_create for a while in all drivers, where the implementation of .bdrv_create would call .bdrv_co_create like this series does it for qcow2. We'll only be able to drop the old interface after deprecating and eventually removing all of the driver-specific compatibility work that remains. The example of qcow2 shows that the "translation" from old to new is managable, but there are a few differences.

Kevin Wolf (10):
block/qapi: Introduce BlockdevCreateOptions block/qapi: Add qcow2 create options to schema
qcow2: Let qcow2_create() handle protocol layer
qcow2: Pass BlockdevCreateOptions to qcow2_create2()
qcow2: Use BlockdevRef in qcow2_create2()
qcow2: Use QCryptoBlockCreateOptions in qcow2_create2()
qcow2: Handle full/falloc preallocation in qcow2_create2()
util: Add qemu_opts_to_qdict_filtered()
qcow2: Use visitor for options in qcow2_create()
block: x-blockdev-create QMP command

 qapi/block-core.json       | 107 ++++++++++++
 include/block/block.h      |   1 +
 include/block/block_int.h  |   2 +
 include/qemu/option.h      |   2 +
 block.c                    |  87 ++++++++++
 block/qcow2.c              | 395 +++++++++++++++++++++++++++++----------------
 util/qemu-option.c         |  28 +++-
 tests/qemu-iotests/049.out |  10 +-
 8 files changed, 486 insertions(+), 146 deletions(-)
Signature · 1 line
2.13.6