From: Eric Blake <eblake@redhat.com>
To: "Kevin Wolf" <kwolf@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Alberto Garcia <berto@igalia.com>,
qemu-block@nongnu.org, Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Leonid Bloch <lbloch@janustech.com>,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] qemu/units: Move out QCow2 specific definitions
Date: Fri, 2 Nov 2018 09:52:25 -0500 [thread overview]
Message-ID: <0b2d802d-4b58-30de-44a8-9f04dc968b1b@redhat.com> (raw)
In-Reply-To: <20181102141030.GH7521@dhcp-200-186.str.redhat.com>
On 11/2/18 9:10 AM, Kevin Wolf wrote:
> Am 02.11.2018 um 13:37 hat Philippe Mathieu-Daudé geschrieben:
>> Hi Kevin,
>>
>> On 2/11/18 12:07, Kevin Wolf wrote:
>>> Am 02.11.2018 um 09:58 hat Philippe Mathieu-Daudé geschrieben:
>>>> This definitions are QCow2 specific, there is no need to expose them
>>>> in the global namespace.
>>>>
>>>> This partially reverts commit 540b8492618eb.
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>
>>> If we don't want this globally, I think we also don't want it in qcow2.
Agreed. I didn't want it in the first place, arguing that if we want
stringification of defaults, it would be better to have a runtime
function do that, rather than adding a set of near-duplicate macro names.
>>
>> I only see this definitions used by block/qcow2.h (b6a95c6d1007).
>>
>> Per 540b8492618eb description "This is needed when a size has to be
>> stringified" but I can't find other code requiring these definitions in the
>> codebase.
>
> I guess the real question is: Is qcow2 the only place that needs
> stringification of sizes?
Probably not. It seems like stringifying a default value is a common desire.
>
> The only value where this actually seems to be used in qcow2 is for
> DEFAULT_CLUSTER_SIZE, as the default value for QemuOpts. Other drivers
> still use plain numbers, but this is less readable.
>
> Then there is VDI which uses (1 * MiB), but that is compiled out and if
> you enable it, it breaks. So it needs the same fix.
>
> Are block drivers the only places where we stringify a size? I imagine
> some device models might use something like it, too?
Indeed, I would prefer a patch that makes it possible for QemuOpts to
pretty-print a default value using a generic runtime stringifier, rather
than keeping these S_ macros around.
>
> I don't mind too much which solution we end up using, but I'd prefer it
> to be universal.
Agree.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-11-02 14:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 8:58 [Qemu-devel] [PATCH] qemu/units: Move out QCow2 specific definitions Philippe Mathieu-Daudé
2018-11-02 11:07 ` Kevin Wolf
2018-11-02 12:37 ` Philippe Mathieu-Daudé
2018-11-02 14:10 ` Kevin Wolf
2018-11-02 14:52 ` Eric Blake [this message]
2018-11-02 15:28 ` Kevin Wolf
2018-11-03 0:29 ` Leonid Bloch
2018-11-05 15:42 ` Eric Blake
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=0b2d802d-4b58-30de-44a8-9f04dc968b1b@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=berto@igalia.com \
--cc=kwolf@redhat.com \
--cc=lbloch@janustech.com \
--cc=mreitz@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).