summaryrefslogtreecommitdiffstats
path: root/storage-daemon
diff options
context:
space:
mode:
authorStefano Garzarella2021-03-08 17:12:32 +0100
committerKevin Wolf2021-03-19 10:15:06 +0100
commit729222af149db3cfaaa5ef1c0773b5c632b7dbee (patch)
tree9340002e43d4b96004e920777958a364d0636a61 /storage-daemon
parentMerge remote-tracking branch 'remotes/nvme/tags/nvme-next-pull-request' into ... (diff)
downloadqemu-729222af149db3cfaaa5ef1c0773b5c632b7dbee.tar.gz
qemu-729222af149db3cfaaa5ef1c0773b5c632b7dbee.tar.xz
qemu-729222af149db3cfaaa5ef1c0773b5c632b7dbee.zip
block: remove format defaults from QemuOpts in bdrv_create_file()
QemuOpts is usually created merging the QemuOptsList of format and protocol. So, when the format calls bdr_create_file(), the 'opts' parameter contains a QemuOptsList with a combination of format and protocol default values. The format properly removes its options before calling bdr_create_file(), but the default values remain in 'opts->list'. So if the protocol has options with the same name (e.g. rbd has 'cluster_size' as qcow2), it will see the default values of the format, since for overlapping options, the format wins. To avoid this issue, lets convert QemuOpts to QDict, in this way we take only the set options, and then convert it back to QemuOpts, using the 'create_opts' of the protocol. So the new QemuOpts, will contain only the protocol defaults. Suggested-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20210308161232.248833-1-sgarzare@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'storage-daemon')
0 files changed, 0 insertions, 0 deletions