Proposal for adding O_DIRECT support into JDK 9

Lu, Yingqi yingqi.lu at intel.com
Tue Sep 12 22:58:03 UTC 2017


Hi Brian/Alan,

Here is the most recent version of the webrev: http://cr.openjdk.java.net/~kkharbas/8164900/webrev.10/

In this version, two issues have been addressed:


1.     Add description on the notion "block" in FileStore:getBlockSize

2.     Move alignment check from IOUtil to Util

There is one remaining issue: we check alignment on buffer size and channel position inside both FileChannelImpl and IOUtil. I looked at the code and think we might be able to remove the checks inside readFromNativeBuffer and writeFromNativeBuffer. However, I want to double check with you on your feedback. Please let me know.

Thanks,
Lucy

From: nio-dev [mailto:nio-dev-bounces at openjdk.java.net] On Behalf Of Lu, Yingqi
Sent: Monday, September 11, 2017 1:14 PM
To: Brian Burkhalter <brian.burkhalter at oracle.com>
Cc: nio-dev at openjdk.java.net
Subject: RE: Proposal for adding O_DIRECT support into JDK 9

Hi Brian,

Thank you for the feedback. I will incorporate it into the next version of the webrev.

Right now, we still have one open issue which was from Alan's previous email regarding to the 2-times check on alignment. Once we resolve that, I will submit webrev version 10 for review.

Thanks,
Lucy

From: Brian Burkhalter [mailto:brian.burkhalter at oracle.com]
Sent: Monday, September 11, 2017 12:26 PM
To: Lu, Yingqi <yingqi.lu at intel.com<mailto:yingqi.lu at intel.com>>
Cc: Alan Bateman <Alan.Bateman at oracle.com<mailto:Alan.Bateman at oracle.com>>; nio-dev at openjdk.java.net<mailto:nio-dev at openjdk.java.net>
Subject: Re: Proposal for adding O_DIRECT support into JDK 9

Hi Lucy,

Here is a slightly reworded version of your draft.

Thanks,

Brian

    /**
     * File storage is typically organized into discrete sequences of bytes called
     * <i>blocks</i>. A block is the smallest storage unit of a file store. Each read
     * and write operation is performed on a multiple of blocks.
     *
     * @implSpec The implementation in this class throws an
     *         {@code UnsupportedOperationException}.
     *
     * @return  the block size of this file store, in bytes
     *
     * @throws  IOException
     *          if an I/O error occurs
     *
     * @throws  UnsupportedOperationException
     *          if the operation is not supported
     *
     * @since 10
     */

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

Here is a draft of the description. Please let me know if this is sufficient.

    /**
     * FileStore typically organizes storage into number of blocks. A block is
     * the smallest storage unit of the file store. Every read and write
     * operations are done on a multiple of blocks.
     *
     * @implSpec The implementation in this class throws an
     *         {@code UnsupportedOperationException}.
     *
     * @return  the block size of this file store, in bytes
     *
     * @throws  IOException
     *          if an I/O error occurs
     *
     * @throws  UnsupportedOperationException
     *          if operation is not supported
     *
     * @since 10
     */

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


More information about the nio-dev mailing list