RFR: 8286763: [REDO] (fc) Tune FileChannel.transferFrom()
Brian Burkhalter
bpb at openjdk.java.net
Mon May 16 20:21:58 UTC 2022
On Mon, 16 May 2022 20:14:07 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Re-do the fix for [JDK-8274113](https://bugs.openjdk.java.net/browse/JDK-8274113) which was reverted by [JDK-8286677.](https://bugs.openjdk.java.net/browse/JDK-8286677)
The problem was found to be that [copy_file_range(2)](https://man7.org/linux/man-pages/man2/copy_file_range.2.html) failed with `EBADF` due to the target having been opened with the `O_APPEND` flag set. This error occurred on
Linux 5.4.17-2102.206.1.el8uek.aarch64 (aarch64)
but not on
Linux 5.11.0-49-generic (amd64)
which we conjecture is due to the restriction having been relaxed in the newer version of the kernel. The change with respect to #8644 is to return `IOS_UNSUPPORTED_CASE` from `transferFrom0()` for an `EBADF` error rather than throwing an `IOException`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8733
More information about the nio-dev
mailing list