RFR: 6980847: (fs) Files.copy needs to be tuned [v6]
Brian Burkhalter
bpb at openjdk.org
Wed Jun 22 01:15:24 UTC 2022
On Tue, 21 Jun 2022 09:23:54 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - 6980847: Convert to fallback to copy0() method
>> - 6980847: work in progress
>
> src/java.base/unix/classes/sun/nio/fs/UnixCopyFile.java line 723:
>
>> 721:
>> 722: static native void copy0(int dst, int src, long address, int transferSize,
>> 723: long addressToPollForCancel)
>
> The naming is a bit unfortunate here. transferTo0 is copy with buffers in user-space. copy0 is with kernel support such as sendfile64 or fcopyfile. I think we need clearer names and improve the comments on the declarations here so that it's clear what they do. I think that's the first step before we split up the high-level copyFile method to make it easier to read and maintain.
Refactored in 04d7502280df1dd0c2dccf34cc93450d86458e81.
-------------
PR: https://git.openjdk.org/jdk/pull/9161
More information about the nio-dev
mailing list