summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMax Reitz2019-02-01 20:29:25 +0100
committerMax Reitz2019-02-25 15:11:27 +0100
commit2654267cc163083f4fb9a6d719468d9dd1bea455 (patch)
tree1199e823b53bb502ec14a24041c54dd4703eefc4 /include
parentiotests: Add quorum case to test 110 (diff)
downloadqemu-2654267cc163083f4fb9a6d719468d9dd1bea455.tar.gz
qemu-2654267cc163083f4fb9a6d719468d9dd1bea455.tar.xz
qemu-2654267cc163083f4fb9a6d719468d9dd1bea455.zip
block: Add strong_runtime_opts to BlockDriver
This new field can be set by block drivers to list the runtime options they accept that may influence the contents of the respective BDS. As of a follow-up patch, this list will be used by the common bdrv_refresh_filename() implementation to decide which options to put into BDS.full_open_options (and consequently whether a JSON filename has to be created), thus freeing the drivers of having to implement that logic themselves. Additionally, this patch adds the field to all of the block drivers that need it and sets it accordingly. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-id: 20190201192935.18394-22-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/block_int.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index e4d4817ea6..160e8cac1f 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -517,6 +517,13 @@ struct BlockDriver {
void (*bdrv_register_buf)(BlockDriverState *bs, void *host, size_t size);
void (*bdrv_unregister_buf)(BlockDriverState *bs, void *host);
QLIST_ENTRY(BlockDriver) list;
+
+ /* Pointer to a NULL-terminated array of names of strong options
+ * that can be specified for bdrv_open(). A strong option is one
+ * that changes the data of a BDS.
+ * If this pointer is NULL, the array is considered empty.
+ * "filename" and "driver" are always considered strong. */
+ const char *const *strong_runtime_opts;
};
typedef struct BlockLimits {