Received: from [140.186.70.92] (port=44228 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OR4Ov-00065Z-9g for qemu-devel@nongnu.org; Tue, 22 Jun 2010 10:24:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OR4Ot-0001g4-P6 for qemu-devel@nongnu.org; Tue, 22 Jun 2010 10:24:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27840) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OR4Ot-0001fu-AG for qemu-devel@nongnu.org; Tue, 22 Jun 2010 10:24:31 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack References: <4C1DF2C1.5040505@redhat.com> <4C1F2093.3060807@redhat.com> <4C1F6482.7020406@codemonkey.ws> <4C1F6973.5020003@redhat.com> <4C1F6B36.8070508@codemonkey.ws> <4C1F70AF.8030108@redhat.com> <4C1F7C6B.3040602@codemonkey.ws> <20100621150058.GA14072@lst.de> <4C207510.60304@redhat.com> Date: Tue, 22 Jun 2010 16:24:21 +0200 In-Reply-To: <4C207510.60304@redhat.com> (Kevin Wolf's message of "Tue, 22 Jun 2010 10:32:16 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Christoph Hellwig , qemu-devel@nongnu.org, Luiz Capitulino , Gerd Hoffmann , Christoph Hellwig , Avi Kivity 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 people >>> vvfat. This is a setting which can't be guessed, btw - it needs >>> to be explicitly set in some way, with file used as a reasonable >>> fallback. >>> >>> - an image format. This one interprets the content the transport >>> protocol delivers to us. This can either be raw for not interpreting >>> it all, or things like qcow2 / vmdk to add more functionality to it. >> >> 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. > > No, that's not a special case. It's the only case there is. > >> In the general case, we have things like vvfat that make people wonder >> whether it's a format or a protocol. You can't stack it onto a >> transport, so it can't be a format! You can't stack a format on it, so >> it can't be a protocol! > > Sure you can stack formats on it. raw and blkdebug are the ones that > will be happy with the data that vvfat provides. You can stack raw and blkdebug on *anything*. And that includes qcow2. Does that make qcow2 a protocol? Are we running in circles yet? :) I've come the conclusion that distinguishing between format and protocol doesn't help. It only breeds confusion (and e-mail, lots of e-mail). I've rethought blockdev_add, and I think I can do quite well without format and protocol. Let me try that in practice. I'll post revised docs & code when I have them.