Proposal for adding O_DIRECT support into JDK 9

Lu, Yingqi at
Thu Aug 31 22:49:09 UTC 2017

Hi Brian,

Here is the webrev.07 version of the patch:

In this version, I have addressed the following issues:

1.      Following the example of stringPlatformChars, made the DirectIOTest native library being compiled automatically. Removed, README file and Makefile.

2.      Added the filesystem type check on Solaris for DirectIOTest.

3.      Checked if there is an equivalent system call like mincore in Windows to enable DirectIOTest for Windows. I could not find anything unfortunately.

4.      Added the DirectIO flag FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH back to Windows version of setDirect0() function.

5.      Addressed the comments from you on DirectIO.c and (now being renamed as

6.      Added the tests for the read() and write() methods which take as parameter an array of buffers ByteBuffer[].

7.      Changed the indentation for continuous lines.
Issues that are still open:

1.      How should we address the issue of AIX OS does not support setting O_DIRECT after the open()

2.      Provide more detailed messages for IOExceptions with DirectIO

3.      Are there any more tests we need to add?
Please take a look at this version and let us know your feedback. I would also like to learn what will be a proper approach to solve the AIX issue and what kind of details we need to provide for the exception messages. I will try to incorporate all of those changes into the next version.

From: Brian Burkhalter [mailto:brian.burkhalter at]
Sent: Wednesday, August 30, 2017 11:47 AM
To: Lu, Yingqi < at>
Cc: nio-dev at
Subject: Re: Proposal for adding O_DIRECT support into JDK 9

I verified that in my Solaris VM Files.getFileStore(path).type() returns "zfs".


On Aug 30, 2017, at 11:44 AM, Lu, Yingqi < at< at>> wrote:

Oh, great! Will do!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nio-dev mailing list