mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
c0625e8092
commit
2654267cc1
23 changed files with 256 additions and 1 deletions
|
@ -676,6 +676,13 @@ static void replication_stop(ReplicationState *rs, bool failover, Error **errp)
|
|||
aio_context_release(aio_context);
|
||||
}
|
||||
|
||||
static const char *const replication_strong_runtime_opts[] = {
|
||||
REPLICATION_MODE,
|
||||
REPLICATION_TOP_ID,
|
||||
|
||||
NULL
|
||||
};
|
||||
|
||||
BlockDriver bdrv_replication = {
|
||||
.format_name = "replication",
|
||||
.instance_size = sizeof(BDRVReplicationState),
|
||||
|
@ -692,6 +699,7 @@ BlockDriver bdrv_replication = {
|
|||
.bdrv_recurse_is_first_non_filter = replication_recurse_is_first_non_filter,
|
||||
|
||||
.has_variable_length = true,
|
||||
.strong_runtime_opts = replication_strong_runtime_opts,
|
||||
};
|
||||
|
||||
static void bdrv_replication_init(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue