From: Chris Mason <chris.mason@fusionio.com>
To: Miao Xie <miaox@cn.fujitsu.com>
Cc: Josef Bacik <josef@redhat.com>,
Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: [RFC PATCH] Btrfs: fix old data problem caused by aio vs dio
Date: Tue, 19 Jun 2012 09:08:44 -0400 [thread overview]
Message-ID: <20120619130844.GE21559@shiny> (raw)
In-Reply-To: <4FE07313.2040104@cn.fujitsu.com>
On Tue, Jun 19, 2012 at 06:39:47AM -0600, Miao Xie wrote:
> The 209th case of xfstests failed because of the race between aio and dio. The
> detail reason is following:
> Task1 Task2 Btrfs-worker
> invalidate pages
> read pages
> do direct io
> invalidate pages*
> finish ordered io
> read data from
> pages
>
> * This step failed because the kernel found the ordered extent object that
> covered the pages and thought the pages were still under busy. And then Task1
> read the old data from those pages.
>
> And beside that, I think all the operations including metadata update and
> bit cleanup of extent state should complete before the dio ends.
>
Thanks for tracking this one down. I'd really like to keep Josef's
change because it makes a very big difference for latencies. The read
operation needs to wait until the ordered IO is completely finished.
-chris
prev parent reply other threads:[~2012-06-19 13:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-19 12:39 [RFC PATCH] Btrfs: fix old data problem caused by aio vs dio Miao Xie
2012-06-19 13:08 ` Chris Mason [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=20120619130844.GE21559@shiny \
--to=chris.mason@fusionio.com \
--cc=josef@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=miaox@cn.fujitsu.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 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).