qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Paul Brook <paul@codesourcery.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush
Date: Wed, 2 Apr 2008 16:23:39 +0100	[thread overview]
Message-ID: <20080402152339.GA15460@shareable.org> (raw)
In-Reply-To: <200804021326.22707.paul@codesourcery.com>

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

  reply	other threads:[~2008-04-02 15:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-01 17:18 [Qemu-devel] [PATCH] Asynchronous reliable and configurable cache flush Ian Jackson
2008-04-01 17:46 ` Paul Brook
2008-04-01 18:45   ` Jamie Lokier
2008-04-02 12:26     ` Paul Brook
2008-04-02 15:23       ` Jamie Lokier [this message]
2008-04-02 16:20         ` Ian Jackson
2008-04-03 11:38           ` Jamie Lokier
2008-04-03 12:06             ` Ian Jackson
2008-04-02 16:27   ` Ian Jackson
2008-04-03  0:40     ` Paul Brook
2008-04-03 10:00       ` Ian Jackson
2008-04-01 18:07 ` Samuel Thibault
2008-04-02 14:21   ` Ian Jackson
2008-04-04 14:29     ` Samuel Thibault
2008-04-02 16:31 ` [Qemu-devel] " Ian Jackson

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=20080402152339.GA15460@shareable.org \
    --to=jamie@shareable.org \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=paul@codesourcery.com \
    --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 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).