Cc: Linus Torvalds <torvalds@...>, Benjamin LaHaise <bcrl@...>, Andrew Morton <akpm@...>, Linux Kernel Mailing List <linux-kernel@...>, Nick Piggin <nickpiggin@...>, Chris Mason <chris.mason@...>
Well, actually, in this case both processes are doing sync IO.
It's just that the writer is direct and the reader isn't, with
the reader usually behind the writer but close enough that
readahead crosses the writer reasonably often. With the
if (retval) test, we only invalidate if nothing got written
at all!
I hadn't even thought of aio directio. Yeah, the invalidate
should happen for -EIOCBQUEUED as well, I guess.
The disparity in direct-io-ness on the part of the reader
vs writer is a userland dum-dum, no question. (That's
getting fixed, too.)
Karl
-