aboutsummaryrefslogtreecommitdiff
path: root/block/quorum.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/quorum.c
parentc0625e80925302c449bb3f7a7ba6eb213da7c1e2 (diff)
downloadqemu-2654267cc163083f4fb9a6d719468d9dd1bea455.zip
qemu-2654267cc163083f4fb9a6d719468d9dd1bea455.tar.gz
qemu-2654267cc163083f4fb9a6d719468d9dd1bea455.tar.bz2
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/quorum.c')
-rw-r--r--block/quorum.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/block/quorum.c b/block/quorum.c
index a890f21..1af6458 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -1104,6 +1104,15 @@ static char *quorum_dirname(BlockDriverState *bs, Error **errp)
return NULL;
}
+static const char *const quorum_strong_runtime_opts[] = {
+ QUORUM_OPT_VOTE_THRESHOLD,
+ QUORUM_OPT_BLKVERIFY,
+ QUORUM_OPT_REWRITE,
+ QUORUM_OPT_READ_PATTERN,
+
+ NULL
+};
+
static BlockDriver bdrv_quorum = {
.format_name = "quorum",
@@ -1128,6 +1137,8 @@ static BlockDriver bdrv_quorum = {
.is_filter = true,
.bdrv_recurse_is_first_non_filter = quorum_recurse_is_first_non_filter,
+
+ .strong_runtime_opts = quorum_strong_runtime_opts,
};
static void bdrv_quorum_init(void)