From: "Michael S. Tsirkin" <mst@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: kvm@vger.kernel.org, Rusty Russell <rusty@rustcorp.com.au>,
qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org
Subject: [Qemu-devel] Re: [PATCH] virtio-spec: document block CMD and FLUSH
Date: Tue, 4 May 2010 21:58:37 +0300 [thread overview]
Message-ID: <20100504185837.GB29725@redhat.com> (raw)
In-Reply-To: <20100504185618.GA29725@redhat.com>
On Tue, May 04, 2010 at 09:56:18PM +0300, Michael S. Tsirkin wrote:
> 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.
Sorry, it doesn't. No idea why I thought it does.
> 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..
next prev parent reply other threads:[~2010-05-04 19:02 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-18 22:22 [Qemu-devel] [PATCH] virtio-spec: document block CMD and FLUSH Michael S. Tsirkin
2010-04-19 21:26 ` [Qemu-devel] " Michael S. Tsirkin
2010-04-28 15:52 ` Michael S. Tsirkin
2010-04-20 1:46 ` [Qemu-devel] " Jamie Lokier
2010-04-20 13:22 ` Paul Brook
2010-04-21 10:39 ` Michael S. Tsirkin
2010-05-04 18:56 ` Christoph Hellwig
2010-05-04 19:01 ` Michael S. Tsirkin
2010-05-04 4:38 ` [Qemu-devel] " Rusty Russell
2010-05-04 6:56 ` Stefan Hajnoczi
2010-05-04 8:34 ` Avi Kivity
2010-05-04 8:41 ` Jens Axboe
2010-05-04 20:17 ` Jamie Lokier
2010-05-05 4:58 ` Rusty Russell
2010-05-05 6:03 ` Neil Brown
2010-05-06 6:05 ` Rusty Russell
2010-05-06 14:57 ` Jamie Lokier
2010-05-06 15:25 ` Jamie Lokier
2010-05-04 10:05 ` Christoph Hellwig
2010-05-04 20:32 ` Jamie Lokier
2010-05-04 18:54 ` Christoph Hellwig
2010-05-04 18:56 ` Michael S. Tsirkin
2010-05-04 18:58 ` Michael S. Tsirkin [this message]
2010-05-05 5:00 ` Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100504185837.GB29725@redhat.com \
--to=mst@redhat.com \
--cc=hch@lst.de \
--cc=kvm@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).