|
| From: | Avi Kivity |
| Subject: | Re: [Qemu-devel] barriers: block layer preparations |
| Date: | Tue, 05 May 2009 16:51:39 +0300 |
| User-agent: | Thunderbird 2.0.0.21 (X11/20090320) |
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
| [Prev in Thread] | Current Thread | [Next in Thread] |