Proposal for adding O_DIRECT support into JDK 9

Alan Bateman Alan.Bateman at oracle.com
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 
> http://cr.openjdk.java.net/~kkharbas/8164900/webrev.05/ 
> <http://cr.openjdk.java.net/%7Ekkharbas/8164900/webrev.05/>
>
> JBS link is available at https://bugs.openjdk.java.net/browse/JDK-8164900
>
>
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.

- FileChannel.read(ByteByffer[])/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.

-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20170828/0804759a/attachment.html>


More information about the nio-dev mailing list