Markus Armbruster <arm...@redhat.com> writes: > Kevin Wolf <kw...@redhat.com> writes: > >> From: Fam Zheng <f...@redhat.com> >> >> This makes VMDK support blockdev-create. The implementation reuses the >> image creation code in vmdk_co_create_opts which now acceptes a callback >> pointer to "retrieve" BlockBackend pointers from the caller. This way we >> separate the logic between file/extent acquisition and initialization. >> >> The QAPI command parameters are mostly the same as the old create_opts >> except the dropped legacy @compat6 switch, which is redundant with >> @hwversion. >> >> Signed-off-by: Fam Zheng <f...@redhat.com> >> Signed-off-by: Kevin Wolf <kw...@redhat.com> >> --- >> qapi/block-core.json | 70 +++++++ >> qapi/qapi-schema.json | 16 +- >> block/vmdk.c | 448 ++++++++++++++++++++++++++++++------------ >> 3 files changed, 400 insertions(+), 134 deletions(-) >> >> diff --git a/qapi/block-core.json b/qapi/block-core.json >> index d4fe710836..0793550cf2 100644 >> --- a/qapi/block-core.json >> +++ b/qapi/block-core.json [...] >> +## >> +# @BlockdevCreateOptionsVmdk: >> +# >> +# Driver specific image creation options for VMDK. >> +# >> +# @file Where to store the new image file. This refers to the image >> +# file for monolithcSparse and streamOptimized format, or the >> +# descriptor file for other formats. >> +# @size Size of the virtual disk in bytes >> +# @extents Where to store the data extents. Required for monolithcFlat, >> +# twoGbMaxExtentSparse and twoGbMaxExtentFlat formats. For >> +# monolithicFlat, only one entry is required; for >> +# twoGbMaxExtent* formats, the number of entries required is >> +# calculated as extent_number = virtual_size / 2GB. > > Doesn't quite spell out that the number of extents has to match > exactly. I'm not sure I care.
Nevermind, you address that in PATCH 5. [...]