Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-28 Thread Christoph Hellwig
On Mon, Jun 21, 2010 at 06:21:09PM +0200, Markus Armbruster wrote: > You describe the special case where format and protocol make some sense: > you have a block driver that can transport bits in arbitrary formats, > and a block driver that interprets bits without caring for transport. > > In the g

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread Daniel P. Berrange
On Tue, Jun 22, 2010 at 05:40:02PM +0100, Jamie Lokier wrote: > Kevin Wolf wrote: > > > The "protocol" parlance breaks down when we move away from the simple > > > stuff. For instance, qcow2 needs two children: the block driver > > > providing the delta bits (in qcow2 format), and the block driver

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread Jamie Lokier
Markus Armbruster wrote: > A possible reason why we currently expose format and protocol at the > user interface is to avoid stacking there. Pragmatic solution?: A few generic flags in each stacking module ("format/protocol/transport"), which govern which other modules are allowed to stack on top

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread Jamie Lokier
Kevin Wolf wrote: > > The "protocol" parlance breaks down when we move away from the simple > > stuff. For instance, qcow2 needs two children: the block driver > > providing the delta bits (in qcow2 format), and the block driver > > providing the base bits (whose configuration happens to be stored

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread Jamie Lokier
Christoph Hellwig wrote: > On Mon, Jun 21, 2010 at 09:51:23AM -0500, Anthony Liguori wrote: > > I can appreciate the desire to keep protocols and formats as an internal > > distinction but as a user visible concept, I think your two examples > > highlight why exposing protocols as formats make se

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread Markus Armbruster
Kevin Wolf writes: > Am 21.06.2010 18:21, schrieb Markus Armbruster: >> Christoph Hellwig writes: >> [...] >>> The user basically can specify two things: >>> >>> - a transport protocol. Normally this is just the filesystem >>>interface, but it can also be nbd, http or for really sick peop

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread Anthony Liguori
On 06/22/2010 07:57 AM, Kevin Wolf wrote: 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

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread Kevin Wolf
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=ima

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread 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 -b

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread Kevin Wolf
Am 21.06.2010 18:21, schrieb Markus Armbruster: > Christoph Hellwig writes: > >> On Mon, Jun 21, 2010 at 09:51:23AM -0500, Anthony Liguori wrote: >>> I can appreciate the desire to keep protocols and formats as an internal >>> distinction but as a user visible concept, I think your two examples

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread Kevin Wolf
Am 21.06.2010 17:56, schrieb Markus Armbruster: > Kevin Wolf writes: > >> Am 21.06.2010 15:37, schrieb Anthony Liguori: >>> On 06/21/2010 08:30 AM, Kevin Wolf wrote: Am 21.06.2010 15:09, schrieb Anthony Liguori: > On 06/21/2010 03:19 AM, Kevin Wolf wrote: > >> Am 2

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-22 Thread Kevin Wolf
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/,

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Markus Armbruster
Christoph Hellwig writes: > On Mon, Jun 21, 2010 at 10:37:37AM -0500, Anthony Liguori wrote: [...] >> [2] -blockdev format=vvfat,file=/path/to/directory,id=blk1 >> >> >> It's not clear to me why [2] should be transport=vvfat. vvfat really >> isn't a transport. > > Well, it's a wart if you wan

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Markus Armbruster
Christoph Hellwig writes: > On Mon, Jun 21, 2010 at 09:51:23AM -0500, Anthony Liguori wrote: >> I can appreciate the desire to keep protocols and formats as an internal >> distinction but as a user visible concept, I think your two examples >> highlight why exposing protocols as formats make se

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Anthony Liguori
On 06/21/2010 11:01 AM, Christoph Hellwig wrote: On Mon, Jun 21, 2010 at 10:37:37AM -0500, Anthony Liguori wrote: There's just a couple cases we should consider: [1] -blockdev format=raw,file=/dev/cdrom,id=blk1 For [1], we just defaulting transport to file is would not give us th

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Christoph Hellwig
On Mon, Jun 21, 2010 at 10:37:37AM -0500, Anthony Liguori wrote: > There's just a couple cases we should consider: > > [1] -blockdev format=raw,file=/dev/cdrom,id=blk1 > For [1], we just defaulting transport to file is would not give us the > same semantics we have today. Is that desirable? By

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Markus Armbruster
Kevin Wolf writes: > Am 21.06.2010 15:37, schrieb Anthony Liguori: >> On 06/21/2010 08:30 AM, Kevin Wolf wrote: >>> Am 21.06.2010 15:09, schrieb Anthony Liguori: >>> On 06/21/2010 03:19 AM, Kevin Wolf wrote: > Am 20.06.2010 12:51, schrieb Avi Kivity: > > >>

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Anthony Liguori
On 06/21/2010 10:00 AM, Christoph Hellwig wrote: Keeping these separate makes a lot of sense to me, even with my user hat on. And as lon as we don't require the transport protocol but fall back to file it's even more understandable for the users, as he simply doesn't have to care about it for th

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread 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.

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Paul Brook
> The user basically can specify two things: > > - a transport protocol. Normally this is just the filesystem >interface, but it can also be nbd, http or for really sick people >vvfat. This is a setting which can't be guessed, btw - it needs >to be explicitly set in some way, with f

Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Christoph Hellwig
On Mon, Jun 21, 2010 at 09:51:23AM -0500, Anthony Liguori wrote: > I can appreciate the desire to keep protocols and formats as an internal > distinction but as a user visible concept, I think your two examples > highlight why exposing protocols as formats make sense. A user doesn't > necessari

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Anthony Liguori
On 06/21/2010 09:51 AM, Anthony Liguori wrote: This is the difference between a protocol and a format. I can appreciate the desire to keep protocols and formats as an internal distinction but as a user visible concept, but *not* as a user visible concept. /me heads for the second cup of c

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Anthony Liguori
On 06/21/2010 09:01 AM, Kevin Wolf wrote: Am 21.06.2010 15:37, schrieb Anthony Liguori: On 06/21/2010 08:30 AM, Kevin Wolf wrote: Am 21.06.2010 15:09, schrieb Anthony Liguori: On 06/21/2010 03:19 AM, Kevin Wolf wrote: Am 20.06.2010 12:51, schrieb Avi Kivity:

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Kevin Wolf
Am 21.06.2010 15:37, schrieb Anthony Liguori: > On 06/21/2010 08:30 AM, Kevin Wolf wrote: >> Am 21.06.2010 15:09, schrieb Anthony Liguori: >> >>> On 06/21/2010 03:19 AM, Kevin Wolf wrote: >>> Am 20.06.2010 12:51, schrieb Avi Kivity: > On 06/18/2010 03:59 PM, Mar

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Anthony Liguori
On 06/21/2010 08:30 AM, Kevin Wolf wrote: Am 21.06.2010 15:09, schrieb Anthony Liguori: On 06/21/2010 03:19 AM, Kevin Wolf wrote: Am 20.06.2010 12:51, schrieb Avi Kivity: On 06/18/2010 03:59 PM, Markus Armbruster wrote: The code is pretty confused about format vs

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Kevin Wolf
Am 21.06.2010 15:09, schrieb Anthony Liguori: > On 06/21/2010 03:19 AM, Kevin Wolf wrote: >> Am 20.06.2010 12:51, schrieb Avi Kivity: >> >>> On 06/18/2010 03:59 PM, Markus Armbruster wrote: >>> The code is pretty confused about format vs. protocol, and so are we. Let's try to fi

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Anthony Liguori
On 06/21/2010 03:19 AM, Kevin Wolf wrote: Am 20.06.2010 12:51, schrieb Avi Kivity: On 06/18/2010 03:59 PM, Markus Armbruster wrote: The code is pretty confused about format vs. protocol, and so are we. Let's try to figure them out. From cruising altitude, all this format, protocol,

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Kevin Wolf
Am 20.06.2010 12:51, schrieb Avi Kivity: > On 06/18/2010 03:59 PM, Markus Armbruster wrote: >> The code is pretty confused about format vs. protocol, and so are we. >> Let's try to figure them out. >> >> From cruising altitude, all this format, protocol, stacking business >> doesn't matter. We pr

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-21 Thread Markus Armbruster
Avi Kivity writes: > On 06/18/2010 03:59 PM, Markus Armbruster wrote: >> The code is pretty confused about format vs. protocol, and so are we. >> Let's try to figure them out. >> >> From cruising altitude, all this format, protocol, stacking business >> doesn't matter. We provide a bunch of arg

[Qemu-devel] Re: block: format vs. protocol, and how they stack

2010-06-20 Thread Avi Kivity
On 06/18/2010 03:59 PM, Markus Armbruster wrote: The code is pretty confused about format vs. protocol, and so are we. Let's try to figure them out. From cruising altitude, all this format, protocol, stacking business doesn't matter. We provide a bunch of arguments, and get an image. If you l