summaryrefslogtreecommitdiffstats
path: root/include/block/block_int.h
diff options
context:
space:
mode:
authorChunyan Liu <cyliu@suse.com>2014-06-05 17:20:51 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2014-06-16 17:23:20 +0800
commit83d0521a1e35989b0cb7235aef48455fedda3ca4 (patch)
treeb500cdb1603182b7249a781712a1f058820d5b1b /include/block/block_int.h
parent4782183da39ec988b8290bbc0289c9f50ba33ea4 (diff)
downloadhqemu-83d0521a1e35989b0cb7235aef48455fedda3ca4.zip
hqemu-83d0521a1e35989b0cb7235aef48455fedda3ca4.tar.gz
change block layer to support both QemuOpts and QEMUOptionParamter
Change block layer to support both QemuOpts and QEMUOptionParameter. After this patch, it will change backend drivers one by one. At the end, QEMUOptionParameter will be removed and only QemuOpts is kept. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block/block_int.h')
-rw-r--r--include/block/block_int.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 8d58334..8a77d79 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -118,6 +118,8 @@ struct BlockDriver {
void (*bdrv_rebind)(BlockDriverState *bs);
int (*bdrv_create)(const char *filename, QEMUOptionParameter *options,
Error **errp);
+ /* FIXME: will remove the duplicate and rename back to bdrv_create later */
+ int (*bdrv_create2)(const char *filename, QemuOpts *opts, Error **errp);
int (*bdrv_set_key)(BlockDriverState *bs, const char *key);
int (*bdrv_make_empty)(BlockDriverState *bs);
/* aio */
@@ -217,7 +219,12 @@ struct BlockDriver {
/* List of options for creating images, terminated by name == NULL */
QEMUOptionParameter *create_options;
-
+ /* FIXME: will replace create_options.
+ * These two fields are mutually exclusive. At most one is non-NULL.
+ * create_options should only be set with bdrv_create, and create_opts
+ * should only be set with bdrv_create2.
+ */
+ QemuOptsList *create_opts;
/*
* Returns 0 for completed check, -errno for internal errors.
@@ -228,6 +235,10 @@ struct BlockDriver {
int (*bdrv_amend_options)(BlockDriverState *bs,
QEMUOptionParameter *options);
+ /* FIXME: will remove the duplicate and rename back to
+ * bdrv_amend_options later
+ */
+ int (*bdrv_amend_options2)(BlockDriverState *bs, QemuOpts *opts);
void (*bdrv_debug_event)(BlockDriverState *bs, BlkDebugEvent event);
OpenPOWER on IntegriCloud