From: Marcelo Tosatti <marcelo@kvack.org>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [kvm-devel] [Qemu-devel] [PATCH] QEMU: fsync AIO writes on flush request
Date: Fri, 28 Mar 2008 16:11:08 -0300 [thread overview]
Message-ID: <20080328191108.GC19547@dmt> (raw)
In-Reply-To: <18413.10773.769938.658683@mariner.uk.xensource.com>
On Fri, Mar 28, 2008 at 05:25:41PM +0000, Ian Jackson wrote:
> Marcelo Tosatti writes ("[Qemu-devel] [PATCH] QEMU: fsync AIO writes on flush request "):
> > Its necessary to guarantee that pending AIO writes have reached stable
> > storage when the flush request returns.
>
> Surely it isn't necessary to call qemu_aio_flush ? Because those
> pending AIO writes have not yet been returned to the guest as
> complete, the guest is not entitled to assume that a FLUSH CACHE
> command (issued before those writes have completed) completing
> successfully means that those interleaved writes have reached stable
> storage.
By the time qemu_aio_flush() finishes, all pending requests submitted
before aio_fsync() will have reached stable storage (aio_fsync will be
queued in the last position of the priority 0 AIO queue).
Unless the scheduling priority of the QEMU process is changed between
AIO write's and the fsync().
> Also, this patch does a synchronous flush (which is bad because it
> stalls the guest while the flush takes place) and it ignores any error
> return (which is quite bad - see my other messages about bdrv_flush,
> caches, etc.)
>
> So I think it would be better to apply
> - my bdrv_flush patch from February which I've reposted today
> and then
> - the asynchronous FLUSH CACHE patch which I've posted today
>
> I think we concluded last time that the change of fsync to fdatasync
> is correct but I think we should wait for the dust to settle before
> introducing another change on top of all this ...
Alright, please also fix the SCSI driver to perform asynchronous flush
with bdrv_aio_flush() and complete the SYNC_CACHE command on the callback.
prev parent reply other threads:[~2008-03-28 19:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 15:05 [Qemu-devel] [PATCH] QEMU: fsync AIO writes on flush request Marcelo Tosatti
2008-03-28 15:07 ` Jamie Lokier
2008-03-28 16:31 ` [kvm-devel] " Marcelo Tosatti
2008-03-28 16:40 ` Paul Brook
2008-03-28 16:59 ` Marcelo Tosatti
2008-03-28 17:00 ` Paul Brook
2008-03-28 18:13 ` Marcelo Tosatti
2008-03-29 1:17 ` Jamie Lokier
2008-03-29 2:02 ` Paul Brook
2008-03-29 2:11 ` Jamie Lokier
2008-03-29 2:43 ` Paul Brook
2008-03-28 18:03 ` Jamie Lokier
2008-03-28 18:36 ` Marcelo Tosatti
2008-03-29 1:09 ` Jamie Lokier
2008-03-29 6:49 ` Marcelo Tosatti
2008-03-28 17:25 ` Ian Jackson
2008-03-28 19:11 ` Marcelo Tosatti [this message]
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=20080328191108.GC19547@dmt \
--to=marcelo@kvack.org \
--cc=Ian.Jackson@eu.citrix.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).