RFR : 8164900 was (Re: Proposal for adding O_DIRECT support into JDK 9)

Brian Burkhalter brian.burkhalter at oracle.com
Wed Aug 30 19:20:40 UTC 2017

Hi Seán,

On Aug 30, 2017, at 12:04 PM, Seán Coffey <sean.coffey at oracle.com> wrote:,
> Is the new exception handling a bit sparse in places with this enhancement ? Take FileChannelImpl.java for example. There are 12 new sites where IOException can be thrown. While calculations are made to determine if the Exception is thrown or not, none of the real detail gets transmitted to the end user. If exceptions were to be seen in these areas then I think the details on channel position and bytes remained etc.. are useful for end user debugging.
Good suggestion. The same situation obtains in IOUtil.java.

With respect to exceptions, I had also been wondering whether if the Unix setDirect0() fails the file system type should be included in the exception message? It is possible that DIO is supported on a given Unix OS but only for certain file system types.

Also in the Unix setDirect0() I see that there is no #else block in the “#ifdef O_DIRECT” conditional compilation section. I don’t know whether this is necessary and if so what would be done in it.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20170830/fba9ecef/attachment-0001.html>

More information about the nio-dev mailing list