From: Kevin Wolf <kwolf@redhat.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH] block: remove format defaults from QemuOpts in bdrv_create_file()
Date: Tue, 9 Mar 2021 12:05:45 +0100 [thread overview]
Message-ID: <20210309110545.GC5798@merkur.fritz.box> (raw)
In-Reply-To: <20210308161232.248833-1-sgarzare@redhat.com>
Am 08.03.2021 um 17:12 hat Stefano Garzarella geschrieben:
> 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>
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2021-03-09 11:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-08 16:12 [PATCH] block: remove format defaults from QemuOpts in bdrv_create_file() Stefano Garzarella
2021-03-09 11:05 ` Kevin Wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210309110545.GC5798@merkur.fritz.box \
--to=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=sgarzare@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).