From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9NH1-0006Dm-AX for qemu-devel@nongnu.org; Tue, 04 May 2010 14:55:15 -0400 Received: from [140.186.70.92] (port=58226 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9NH0-0006DF-1D for qemu-devel@nongnu.org; Tue, 04 May 2010 14:55:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9NGy-0007rj-GN for qemu-devel@nongnu.org; Tue, 04 May 2010 14:55:13 -0400 Received: from verein.lst.de ([213.95.11.210]:45984) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9NGy-0007rc-0e for qemu-devel@nongnu.org; Tue, 04 May 2010 14:55:12 -0400 Date: Tue, 4 May 2010 20:54:59 +0200 From: Christoph Hellwig Message-ID: <20100504185459.GA24998@lst.de> References: <20100218222220.GA14847@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100218222220.GA14847@redhat.com> Subject: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: kvm@vger.kernel.org, Rusty Russell , qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org, hch@lst.de On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: > I took a stub at documenting CMD and FLUSH request types in virtio > block. Christoph, could you look over this please? > > I note that the interface seems full of warts to me, > this might be a first step to cleaning them. The whole virtio-blk interface is full of warts. It has been extended rather ad-hoc, so that is rather expected. > One issue I struggled with especially is how type > field mixes bits and non-bit values. I ended up > simply defining all legal values, so that we have > CMD = 2, CMD_OUT = 3 and so on. It's basically a complete mess without much logic behind it. > +\change_unchanged > +the high bit > +\change_inserted 0 1266497301 > + (VIRTIO_BLK_T_BARRIER) > +\change_unchanged > + indicates that this request acts as a barrier and that all preceeding requests > + must be complete before this one, and all following requests must not be > + started until this is complete. > + > +\change_inserted 0 1266504385 > + Note that a barrier does not flush caches in the underlying backend device > + in host, and thus does not serve as data consistency guarantee. > + Driver must use FLUSH request to flush the host cache. > +\change_unchanged I'm not sure it's even worth documenting it. I can't see any way to actually implement safe behaviour with the VIRTIO_BLK_T_BARRIER-style barriers. Btw, did I mention that .lyx is a a really horrible format to review diffs for? Plain latex would be a lot better..