Proposal for adding O_DIRECT support into JDK 9

Brian Burkhalter brian.burkhalter at oracle.com
Thu Sep 7 18:38:14 UTC 2017


Hi Lucy,

On Sep 6, 2017, at 11:38 AM, Lu, Yingqi <yingqi.lu at intel.com> wrote:

> The webrev.08 is available at http://cr.openjdk.java.net/~kkharbas/8164900/webrev.08/
>  
> It supposes to address the following the issues. Please let me know if there is anything missing.

I was off yesterday so I need to catch up here.

On Sep 7, 2017, at 12:52 AM, huaming.li at oracle.com wrote:
> I applied the patch, face following compilation error, I worked on Mac, Darwin Kernel Version 16.7.0.
> 
> /workspace/jdk/jdk10/jdk/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java:247: error: cannot find symbol
>             oflags |= O_DIRECT;
>                       ^
>   symbol:   variable O_DIRECT
>   location: class UnixChannelFactory
> 
The same failure occurs of course on Solaris. In the build phase it is resolved by 

--- a/src/java.base/unix/classes/sun/nio/fs/UnixConstants.java.template
+++ b/src/java.base/unix/classes/sun/nio/fs/UnixConstants.java.template
@@ -72,6 +72,9 @@
 
 #ifdef O_DIRECT
     static final int PREFIX_O_DIRECT = O_DIRECT;
+#else
+    // not supported (dummy values will not be used at runtime).
+    static final int PREFIX_O_DIRECT = 00;
 #endif
 
     static final int PREFIX_S_IAMB =

I am currently running a build+regression job on Linux, macOS, Solaris, and Windows.

Thanks,

Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20170907/5ab9bc7e/attachment.html>


More information about the nio-dev mailing list