[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH |
Date: |
Tue, 4 May 2010 21:56:18 +0300 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Tue, May 04, 2010 at 08:54:59PM +0200, Christoph Hellwig wrote:
> 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.
lguest seems to still use this.
I guess if you have a reliable host, VIRTIO_BLK_T_BARRIER is enough?
> Btw, did I mention that .lyx is a a really horrible format to review
> diffs for? Plain latex would be a lot better..
- [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH, (continued)
[Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH, Christoph Hellwig, 2010/05/04
Re: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH, Jamie Lokier, 2010/05/04
[Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH, Christoph Hellwig, 2010/05/04