From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57088 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OR6bx-0006hO-MV for qemu-devel@nongnu.org; Tue, 22 Jun 2010 12:46:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OR6bw-0000Df-3x for qemu-devel@nongnu.org; Tue, 22 Jun 2010 12:46:09 -0400 Received: from mail2.shareable.org ([80.68.89.115]:49551) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OR6bv-0000DQ-WA for qemu-devel@nongnu.org; Tue, 22 Jun 2010 12:46:08 -0400 Date: Tue, 22 Jun 2010 17:46:06 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] Re: block: format vs. protocol, and how they stack Message-ID: <20100622164606.GE4371@shareable.org> References: <4C1DF2C1.5040505@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , Christoph Hellwig , qemu-devel@nongnu.org, Luiz Capitulino , Gerd Hoffmann , Avi Kivity 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 or underneath. For example, vvfat may provide a blockdev-like abstraction, along with flags STACK_ABOVE_ONLY_RAW | STACK_BELOW_ONLY_DIRECTORY, which means "raw" and "blkdebug" are allowed above (of course ;-) but other things like the image formats shouldn't be. And below, it can't stack on a blockdev-like abstraction, but needs a directory and uses filesystem operations on it - the thing that Plan9fs needs. Btw, I think we expose "format" because "virtual disk image file format" is a useful and meaningful concept to users. When someone needs to use a .VMDK file, they know it as a "VMDK format file", not "I must use the VMDK protocol with this file". -- Jamie