There are some strange O_DIRECT corner cases in here such that the 'last writer' may actually be a 'last reader' and winning can mean have a copyof the page in page cache older than the copy on disk.As long as it is marked dirty so that it eventually gets synced to disk,it shouldn't matter.
No, Chris is pointing out that an an O_DIRECT write can leave clean read pages in the page cache.
All it takes is giving a source buffer for the write which is an mmap ()ed apeture of the region that is being written to. If you get the offsets right you can get the get_user_pages() down in fs/direct-io.c will populate the page cache before the actual O_DIRECT write gets to it.
- z - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- From: Trond Myklebust <[email protected]>
- Re: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- References:
- [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- From: Zach Brown <[email protected]>
- RE: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- From: "Ananiev, Leonid I" <[email protected]>
- Re: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- From: Chris Mason <[email protected]>
- Re: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- From: Benjamin LaHaise <[email protected]>
- Re: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- From: Trond Myklebust <[email protected]>
- Re: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- From: Chris Mason <[email protected]>
- Re: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- From: Trond Myklebust <[email protected]>
- [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- Prev by Date: Re: [PATCH] kbuild: Add the code maturity levels DEPRECATED and OBSOLETE.
- Next by Date: Re: [PATCH] siimage: DRAC4 note
- Previous by thread: Re: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- Next by thread: Re: [PATCH] aio: propogate post-EIOCBQUEUED errors to completion event
- Index(es):