RFR: 8293121: (fs) Refactor UnixFileSystem copying into generic Unix, Linux, and BSD implementations [v3]
Brian Burkhalter
bpb at openjdk.org
Thu Sep 1 16:16:36 UTC 2022
On Thu, 1 Sep 2022 07:56:32 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8293121: Forgot to move UnixCopyFile.c to UnixFileSystem.c
>
> src/java.base/linux/native/libnio/fs/LinuxNativeDispatcher.c line 151:
>
>> 149: jint fd, jlong offset, jlong len, jint advice)
>> 150: {
>> 151: return posix_fadvise((int)fd, (off_t)offset, (off_t)len, (int)advice);
>
> I assume this should be posix_fadvise64 as you'll need a off64_t on 32-bit systems.
Fixed in b6cb94901d1bbaa34917a5aaf381ecf700282c54.
> src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java line 428:
>
>> 426:
>> 427: // whether direct copying is supported on this platform
>> 428: private static volatile boolean directCopyNotSupported;
>
> Would it be possible to move MIN_BUFFER_SIZE and directCopyNotSupported to the top so they are declared before the instance fields?
Fixed in b6cb94901d1bbaa34917a5aaf381ecf700282c54.
-------------
PR: https://git.openjdk.org/jdk/pull/10093
More information about the nio-dev
mailing list