Proposal for adding O_DIRECT support into JDK 9

Alan Bateman Alan.Bateman at
Mon Aug 28 12:49:32 UTC 2017

On 25/08/2017 17:38, Lu, Yingqi wrote:
> Dear All,
> Please let us know if you have any additional feedback or questions on 
> this patch.
> Patch is available at 
> <>
> JBS link is available at
I looked through the latest webrev and I think it's looking quite good 
(all the issues that we discussed previously have been addressed).

I think Brian is looking through the tests but one question on DirectIO 
is whether you place to convert that into a native test that is compiled 
in the build. It may otherwise get forgotten.

A few minor comments:

- FileStore::getBlockSize - the throws UOE can be dropped from the 
signature as it's unchecked (leave the @throws UOE in the javadoc of course)

- FileChannelImpl can be created without a path so it might be useful to 
add "assert path != null" to the direct case as we should never create a 
FileChannel for direct I/O but without a path.

- Minor nit but the "//" comments need a spec to be consistent with the 
existing comments.

-[])/write(ByteBuffer[]) loop over buffers 
but they should only do this when direct is true.

- FileDispatcher.setDirectIO - "{" can be moved up to the previous line.

I think that is all I have for now.

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

More information about the nio-dev mailing list