From: Avi Kivity <avi@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] barriers: block layer preparations
Date: Tue, 05 May 2009 16:51:39 +0300 [thread overview]
Message-ID: <4A00446B.7070404@redhat.com> (raw)
In-Reply-To: <20090505120817.GA30721@lst.de>
Christoph Hellwig wrote:
> Add a flag to BlockDriverState to advertise barriers support, and add a flags
> argument to bdrv_aio_readv/writev to allow passing down the barrier flag.
>
> Note that the flags argument to bdrv_aio_readv is for now actually superflous
> because write barriers obviously only apply to writes. I kept the read side
> argument so the API is symmetric and we can easily add more flags to both
> of them.
>
>
> @@ -1498,7 +1498,7 @@ static void qcow_aio_write_cb(void *opaq
> acb->hd_aiocb = bdrv_aio_writev(s->hd,
> (acb->cluster_offset >> 9) + index_in_cluster,
> &acb->hd_qiov, acb->n,
> - qcow_aio_write_cb, acb);
> + qcow_aio_write_cb, acb, 2);
>
2?
An alternative approach is to add a new op, bdrv_aio_barrier(),
submitted immediately after the write. It's probably more complicated
overall.
A barrier for read can be meaningful if the guest wishes to read a
known-to-be-stable write. I don't think any guest can make use of this
though.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2009-05-05 13:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-05 12:08 [Qemu-devel] [PATCH 0/3] write barrier support Christoph Hellwig
2009-05-05 12:08 ` [Qemu-devel] barriers: block layer preparations Christoph Hellwig
2009-05-05 13:51 ` Avi Kivity [this message]
2009-05-05 15:38 ` Jamie Lokier
2009-05-05 15:49 ` Avi Kivity
2009-05-05 16:00 ` Jamie Lokier
2009-05-05 20:57 ` Christoph Hellwig
2009-05-05 22:49 ` Jamie Lokier
2009-05-05 12:08 ` [Qemu-devel] [PATCH 2/3] barriers: block-raw-posix barrier support Christoph Hellwig
2009-05-05 12:33 ` Jamie Lokier
2009-05-05 13:29 ` Christoph Hellwig
2009-05-05 16:00 ` Jamie Lokier
2009-05-05 12:09 ` [Qemu-devel] [PATCH 3/3] barriers: virtio Christoph Hellwig
2009-05-05 13:53 ` [Qemu-devel] [PATCH 0/3] write barrier support Avi Kivity
2009-05-05 21:00 ` Christoph Hellwig
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=4A00446B.7070404@redhat.com \
--to=avi@redhat.com \
--cc=hch@lst.de \
--cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.