[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache fl
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush |
Date: |
Tue, 1 Apr 2008 19:45:02 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Paul Brook wrote:
> > @@ -1021,6 +1031,13 @@ static void ide_write_dma_cb(void *opaque, int ret)
> >
> > /* end of transfer ? */
> > if (s->nsector == 0) {
> > + if (!s->write_cache) {
> > + ret = bdrv_flush(s->bs);
> > + if (ret != 0) {
> > + ide_dma_error(s);
> > + return;
> > + }
> > + }
>
> By my reading this is adding a synchronous flush to the end of an
> async write operation, which in practice makes the whole operation
> synchronous.
Looks that way to me too. It might be simplest to open the device
with O_DSYNC when !s->write_cache and user actually wants fdatasync,
so that async write can be used. I suspect every platform with useful
Posix AIO has O_DSYNC.
Otherwise, chaining where the completion of aio_write triggers
aio_fsync instead of reporting completion to the guest?
-- Jamie
- [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Ian Jackson, 2008/04/01
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Paul Brook, 2008/04/01
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush,
Jamie Lokier <=
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Paul Brook, 2008/04/02
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Jamie Lokier, 2008/04/02
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Ian Jackson, 2008/04/02
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Jamie Lokier, 2008/04/03
- Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Ian Jackson, 2008/04/03
Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Ian Jackson, 2008/04/02
Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush, Samuel Thibault, 2008/04/01