From: Joel Becker <jlbec@evilplan.org>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] ocfs2: serialize unaligned aio
Date: Thu, 28 Jul 2011 02:08:02 -0700 [thread overview]
Message-ID: <20110728090801.GB9495@noexit.corp.google.com> (raw)
In-Reply-To: <20110622212338.GA20816@wotan.suse.de>
On Wed, Jun 22, 2011 at 02:23:38PM -0700, Mark Fasheh wrote:
> Fix a corruption that can happen when we have (two or more) outstanding
> aio's to an overlapping unaligned region. Ext4
> (e9e3bcecf44c04b9e6b505fd8e2eb9cea58fb94d) and xfs recently had to fix
> similar issues.
>
> In our case what happens is that we can have an outstanding aio on a region
> and if a write comes in with some bytes overlapping the original aio we may
> decide to read that region into a page before continuing (typically because
> of buffered-io fallback). Since we have no ordering guarantees with the
> aio, we can read stale or bad data into the page and then write it back out.
>
> If the i/o is page and block aligned, then we avoid this issue as there
> won't be any need to read data from disk.
>
> I took the same approach as Eric in the ext4 patch and introduced some
> serialization of unaligned async direct i/o. I don't expect this to have an
> effect on the most common cases of AIO. Unaligned aio will be slower
> though, but that's far more acceptable than data corruption.
>
> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
This patch is now in the fixes branch of ocfs2.git.
Joel
--
"The one important thing i have learned over the years is the
difference between taking one's work seriously and taking one's self
seriously. The first is imperative and the second is disastrous."
-Margot Fonteyn
http://www.jlbec.org/
jlbec at evilplan.org
prev parent reply other threads:[~2011-07-28 9:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-22 21:23 [Ocfs2-devel] ocfs2: serialize unaligned aio Mark Fasheh
2011-06-23 3:44 ` Tao Ma
2011-06-26 7:22 ` Joel Becker
2011-06-27 16:23 ` Mark Fasheh
2011-06-27 16:43 ` Sunil Mushran
2011-06-27 17:26 ` Mark Fasheh
2011-07-28 9:08 ` Joel Becker [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=20110728090801.GB9495@noexit.corp.google.com \
--to=jlbec@evilplan.org \
--cc=ocfs2-devel@oss.oracle.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.