From: Kevin Wolf <kwolf@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Christoph Hellwig <chellwig@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>, Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] Re: block: format vs. protocol, and how they stack
Date: Tue, 22 Jun 2010 14:57:38 +0200 [thread overview]
Message-ID: <4C20B342.5040804@redhat.com> (raw)
In-Reply-To: <4C20AF1E.1070204@codemonkey.ws>
Am 22.06.2010 14:39, schrieb Anthony Liguori:
> On 06/22/2010 03:10 AM, Kevin Wolf wrote:
>> Am 21.06.2010 17:34, schrieb Anthony Liguori:
>>
>>> On 06/21/2010 09:01 AM, Kevin Wolf wrote:
>>>
>>>> No, what I'm saying is that even in your model
>>>>
>>>> -blockdev format=qcow2,file=image.qcow2,id=blk1
>>>>
>>>> becomes qcow2 -> file automatically, whereas
>>>>
>>>> -blockdev format=vvfat,file=/tmp/dir/,id=blk1
>>>>
>>>> doesn't become vvfat -> file, but stays just vvfat.
>>>>
>>>>
>>> I should say, that -blockdev format= vs. -blockdev transport= is
>>> definitely at a place where I don't care that much.
>>>
>>> The things that I think are most important are:
>>>
>>> 1) That we have structured options that map well to config file without
>>> trickery to do nesting
>>> 2) That we don't automagically pass options through from the first layer
>>> down to subsequent layers
>>>
>> Does this mean that you need to specify the protocol explicitly for any
>> non-trivial case? So if you want to use just default for everything you
>> can use
>>
>> -blockdev id=foo,format=qcow2,file=foo.qcow2
>>
>
> Yes. I think we should explicitly support an option like file.
Makes sense. I don't really like adding some special magic for file, but
I do see that it's a requirement to make at least the simplest case easy
- and this was about the only clear result of my discussion with Markus
before he posted his proposal.
>> and it will be turned into something sensible automagically (namely
>> adding a file blockdev underneath and passing the file parameter to that
>> one), but if you want to change an option, you need to specify both?
>>
>> -blockdev id=foo,format=qcow2,parent=foo_file
>> -blockdev id=foo_file,format=file,file=foo.qcow2,cache=off
>>
>> What about read-only?
>
> Good question. If a user specifies file, I think the (or generic block
> layer) should have wide latitude to decide how to creating that backing
> format which could include propagating options that it thinks are
> reasonable (like readonly).
Right, if we get to use a default value, we can propagate things that
the generic block layer knows. However, as soon as someone specifies a
protocol explicitly, he'll need to add readonly=on to each -blockdev in
the chain?
> My concern is seeing something like:
>
> -blockdev id=foo,format=qcow2,file=blah.img,funkyopt=value
>
> or:
>
> -blockdev id=foo,format=qcow2,protocol=[file=blah.img,funkyopt=value]
>
> I think the later syntax is overwhelming. If the semantics of the
> former syntax is "passthrough any options we don't understand at this
> layer", I'm afraid it gets too confusing about which level actually
> processed the option (and it certainly doesn't deal with propagation).
The former involves definitely too much magic for assigning the options
to the right blockdev. The latter would be more comprehensible, but
isn't really nice either.
On the other hand, funkyopt might be something as common as cache, and
I'd hate to require specifying the protocol explicitly in a second
-blockdev referenced by another ID when you just want to change the
cache option.
Kevin
next prev parent reply other threads:[~2010-06-22 12:57 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-18 12:59 [Qemu-devel] block: format vs. protocol, and how they stack Markus Armbruster
2010-06-20 10:51 ` [Qemu-devel] " Avi Kivity
2010-06-21 7:00 ` Markus Armbruster
2010-06-22 16:46 ` Jamie Lokier
2010-06-21 8:19 ` Kevin Wolf
2010-06-21 13:09 ` Anthony Liguori
2010-06-21 13:30 ` Kevin Wolf
2010-06-21 13:37 ` Anthony Liguori
2010-06-21 14:01 ` Kevin Wolf
2010-06-21 14:51 ` Anthony Liguori
2010-06-21 14:52 ` Anthony Liguori
2010-06-21 15:00 ` Christoph Hellwig
2010-06-21 15:22 ` Paul Brook
2010-06-21 15:37 ` Anthony Liguori
2010-06-21 16:01 ` Christoph Hellwig
2010-06-21 16:09 ` Anthony Liguori
2010-06-21 16:36 ` Markus Armbruster
2010-06-21 16:21 ` Markus Armbruster
2010-06-22 8:32 ` Kevin Wolf
2010-06-22 14:24 ` Markus Armbruster
2010-06-28 10:28 ` Christoph Hellwig
2010-06-22 16:30 ` Jamie Lokier
2010-06-21 15:34 ` Anthony Liguori
2010-06-22 8:10 ` Kevin Wolf
2010-06-22 12:39 ` Anthony Liguori
2010-06-22 12:57 ` Kevin Wolf [this message]
2010-06-22 13:07 ` Anthony Liguori
2010-06-21 15:56 ` Markus Armbruster
2010-06-22 8:22 ` Kevin Wolf
2010-06-22 16:40 ` Jamie Lokier
2010-06-22 16:56 ` Daniel P. Berrange
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=4C20B342.5040804@redhat.com \
--to=kwolf@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=armbru@redhat.com \
--cc=avi@redhat.com \
--cc=chellwig@redhat.com \
--cc=kraxel@redhat.com \
--cc=lcapitulino@redhat.com \
--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).