[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070220161948.GQ6133@think.oraclecorp.com>
Date: Tue, 20 Feb 2007 11:19:48 -0500
From: Chris Mason <chris.mason@...cle.com>
To: Arjan van de Ven <arjan@...radead.org>
Cc: Trond Myklebust <trond.myklebust@....uio.no>,
Benjamin LaHaise <bcrl@...ck.org>,
"Ananiev, Leonid I" <leonid.i.ananiev@...el.com>,
Zach Brown <zach.brown@...cle.com>, linux-aio@...ck.org,
linux-kernel@...r.kernel.org,
Suparna bhattacharya <suparna@...ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
On Tue, Feb 20, 2007 at 05:06:47PM +0100, Arjan van de Ven wrote:
> > We don't try to resolve "conflicting" writes between ordinary mmap() and
> > write(), so why should we be doing it for mmap and O_DIRECT?
> >
> > mmap() is designed to violate the ordinary mutex locks for write(), so
> > if a conflict arises, whether it be with O_DIRECT or ordinary writes
> > then it is a case of "last writer wins".
>
> but.. wouldn't an O_DIRECT *read* even cause this?
The O_DIRECT read is fine because it doesn't leave bad data in the page
cache. The point of doing invalidate_inode_pages2_range is to purge
page cache data that has the old contents of the file before the
O_DIRECT write.
-chris
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists