diff options
author | Max Reitz <mreitz@redhat.com> | 2019-02-01 20:29:25 +0100 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2019-02-25 15:11:27 +0100 |
commit | 2654267cc163083f4fb9a6d719468d9dd1bea455 (patch) | |
tree | 1199e823b53bb502ec14a24041c54dd4703eefc4 /block/qcow2.c | |
parent | c0625e80925302c449bb3f7a7ba6eb213da7c1e2 (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/qcow2.c')
-rw-r--r-- | block/qcow2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 3826ce7a39..92242fb14f 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -4936,6 +4936,12 @@ static QemuOptsList qcow2_create_opts = { } }; +static const char *const qcow2_strong_runtime_opts[] = { + "encrypt." BLOCK_CRYPTO_OPT_QCOW_KEY_SECRET, + + NULL +}; + BlockDriver bdrv_qcow2 = { .format_name = "qcow2", .instance_size = sizeof(BDRVQcow2State), @@ -4984,6 +4990,7 @@ BlockDriver bdrv_qcow2 = { .bdrv_inactivate = qcow2_inactivate, .create_opts = &qcow2_create_opts, + .strong_runtime_opts = qcow2_strong_runtime_opts, .bdrv_co_check = qcow2_co_check, .bdrv_amend_options = qcow2_amend_options, |