aboutsummaryrefslogtreecommitdiff
path: root/block/replication.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2019-02-01 20:29:25 +0100
committerMax Reitz <mreitz@redhat.com>2019-02-25 15:11:27 +0100
commit2654267cc163083f4fb9a6d719468d9dd1bea455 (patch)
tree1199e823b53bb502ec14a24041c54dd4703eefc4 /block/replication.c
parentc0625e80925302c449bb3f7a7ba6eb213da7c1e2 (diff)
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 'block/replication.c')
-rw-r--r--block/replication.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/block/replication.c b/block/replication.c
index 9b332002ee..4c80b54daf 100644
--- a/block/replication.c
+++ b/block/replication.c
@@ -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)