mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
block: x-blockdev-create QMP command
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 <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
e8eb863778
commit
b0292b851b
5 changed files with 94 additions and 2 deletions
|
@ -129,8 +129,11 @@ struct BlockDriver {
|
|||
int (*bdrv_file_open)(BlockDriverState *bs, QDict *options, int flags,
|
||||
Error **errp);
|
||||
void (*bdrv_close)(BlockDriverState *bs);
|
||||
int coroutine_fn (*bdrv_co_create_opts)(const char *filename, QemuOpts *opts,
|
||||
int coroutine_fn (*bdrv_co_create)(BlockdevCreateOptions *opts,
|
||||
Error **errp);
|
||||
int coroutine_fn (*bdrv_co_create_opts)(const char *filename,
|
||||
QemuOpts *opts,
|
||||
Error **errp);
|
||||
int (*bdrv_make_empty)(BlockDriverState *bs);
|
||||
|
||||
void (*bdrv_refresh_filename)(BlockDriverState *bs, QDict *options);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue