Hi Brain, Thank you very much for reviewing the patch and providing the detailed error/warning messages. They are very helpful!
We will look into the issues and solve them in the next version of the patch. Test cases for O_DIRECT and modified copyright year will be added in next version too. Thanks, Lucy From: Brian Burkhalter [mailto:brian.burkhal...@oracle.com] Sent: Tuesday, October 04, 2016 5:06 PM To: Lu, Yingqi <yingqi...@intel.com> Cc: Langer, Christoph <christoph.lan...@sap.com>; Alan Bateman <alan.bate...@oracle.com>; core-libs-dev@openjdk.java.net; nio-...@openjdk.java.net; Kharbas, Kishor <kishor.khar...@intel.com>; Kaczmarek, Eric <eric.kaczma...@intel.com> Subject: Re: Proposal for adding O_DIRECT support into JDK 9 Hi Lucy, On Oct 4, 2016, at 10:24 AM, Lu, Yingqi <yingqi...@intel.com<mailto:yingqi...@intel.com>> wrote: Anyone else has any feedback/comments? I looked over the 8164900-2 patch and did not see any conceptual problems per se. I did not however scrutinize all the detailed changes, especially the more extensive ones in FileDispatcherImpl.c. I did however run the patch through our regression tests for IO and NIO and encountered some problems. Firstly the patch breaks the build on OS X [1], Solaris [2], and Windows [3]. Note that the code under src/java.base/unix is built on all Unix systems including Linux, OS X, and Solaris. Secondly but of lesser note there were some warnings during the Linux build [4]. Otherwise the IO and NIO tests succeeded on Linux, but that only suggests that pre-existing functionality is preserved as those tests of course do not exercise the new code for which I suppose tests will be provided in the final version of the patch. Regards, Brian [1] OS X build/macosx-x64/support/gensrc/java.base/sun/nio/fs/UnixConstants.java:41: error: self-reference in initializer static final int O_DIRECT = O_DIRECT; ^ [2] Solaris build/solaris-x64/support/gensrc/java.base/sun/nio/fs/UnixConstants.java:41: error: self-reference in initializer static final int O_DIRECT = O_DIRECT; ^ [3] Windows jdk\src\java.base\windows\classes\java\io\FileDescriptor.java:76: error: <anonymous java.io.FileDescriptor$1> is not abstract and does not override abstract method getDirect(FileDescriptor) in JavaIOFileDescriptorAccess new JavaIOFileDescriptorAccess() { ^ [4] Linux (Ubuntu 16.04 amd64 desktop) jdk/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c: In function 'readDirect': jdk/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c:104:5: warning: ignoring return value of 'posix_memalign', declared with attribute warn_unused_result [-Wunused-result] posix_memalign(&bytes, pageSize, newLen); ^ jdk/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c: In function 'writeDirect': jdk/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c:131:5: warning: ignoring return value of 'posix_memalign', declared with attribute warn_unused_result [-Wunused-result] posix_memalign(&bytes, pageSize, len); ^ jdk/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c: In function 'Java_sun_nio_ch_FileDispatcherImpl_readvDirect0': jdk/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c:250:5: warning: ignoring return value of 'posix_memalign', declared with attribute warn_unused_result [-Wunused-result] posix_memalign(&bytes, pageSize, newLen); ^ jdk/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c: In function 'Java_sun_nio_ch_FileDispatcherImpl_writevDirect0': jdk/src/java.base/unix/native/libnio/ch/FileDispatcherImpl.c:393:5: warning: ignoring return value of 'posix_memalign', declared with attribute warn_unused_result [-Wunused-result] posix_memalign(&bytes, pageSize, totalLen)