[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: |
Wed, 2 Apr 2008 16:23:39 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Paul Brook wrote:
> > 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.
>
> The cache is dynamically enabled/disabled by the target. This means
> you've got to close and repopen the file every time it changes,
> which is likely to get really hairy.
Just open two descriptors :-)
I'm not sure if F_SETFL can be used.
Both descriptors are useful with the cache enabled, if the SATA FUA
(force unit access) bit is set on a write command. Only those writes
would use the O_DSYNC descriptor.
> > Otherwise, chaining where the completion of aio_write triggers
> > aio_fsync instead of reporting completion to the guest?
>
> Yes, that should do it.
Yes, though O_DSYNC will save a system call.
-- Jamie
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
[Qemu-devel] Re: [PATCH] Asynchronous reliable and configurable cache flush, Ian Jackson, 2008/04/02