OSDN Git Service

vmdk: Implement .bdrv_co_create callback
authorFam Zheng <famz@redhat.com>
Tue, 15 May 2018 15:36:32 +0000 (23:36 +0800)
committerKevin Wolf <kwolf@redhat.com>
Fri, 1 Feb 2019 12:46:44 +0000 (13:46 +0100)
commit3015372dd09642b911f48d942d1e27fc655b1f22
treead2e1a5206826dfe742bad1d82f363a10e75e998
parent5be28490cad988c3882054fc02e87a40a94863f7
vmdk: Implement .bdrv_co_create callback

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 <famz@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vmdk.c
qapi/block-core.json
qapi/qapi-schema.json