Thread (2 messages) 2 messages, 2 authors, 2012-06-19

Re: [RFC PATCH] Btrfs: fix old data problem caused by aio vs dio

From: Chris Mason <hidden>
Date: 2012-06-19 13:08:47

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help