Proposal for adding O_DIRECT support into JDK 9

Alan Bateman Alan.Bateman at oracle.com
Mon Sep 26 18:41:48 UTC 2016



On 26/09/2016 19:17, Lu, Yingqi wrote:
> Hi All,
>
> The second version of the patch is now available at http://cr.openjdk.java.net/~igraves/8164900-1/. In this version, we moved the O_DIRECT support from FIS/FOS/RAF to FileChannel. We implemented O_DIRECT as a StandardOpenOption. The reason we did not make it as one of the ExtendedOpenOptions is because we found ExtendedOpenOption is now moved to jdk.unsupported. Please let us know if we misunderstood anything here. We can modify it accordingly if there is a better place to put this flag.
ExtendedOpenOption seems the right place for this (we haven't found a 
good home for this yet).

I skimmed the implementation and the changes to readv0/write0 are a 
concern - I suspect you'll need to hoist the bulk of this into 
FileChannelImpl so that most of this native code can be eliminated.

-Alan


More information about the nio-dev mailing list