RFR: 8375294: (fs) Files.copy can fail with EOPNOTSUPP when copy_file_range not supported
Jaikiran Pai
jpai at openjdk.org
Thu Jan 15 06:56:52 UTC 2026
On Wed, 14 Jan 2026 18:26:52 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Handle `errno` value `EOPNOTSUPP` for `copy_file_range` system call on Linux.
Hello Brian, the change looks good to me. Interestingly `man copy_file_range` doesn't make a mention of this `errno`. Looking at `man errno` it says:
ENOSYS Function not implemented (POSIX.1-2001).
...
ENOTSUP Operation not supported (POSIX.1-2001).
...
EOPNOTSUPP Operation not supported on socket (POSIX.1-2001).
(ENOTSUP and EOPNOTSUPP have the same value on Linux, but according to POSIX.1 these error values should be distinct.)
Given this, do you think we should also include `ENOTSUP` in this change?
-------------
Marked as reviewed by jpai (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/29234#pullrequestreview-3664172712
More information about the nio-dev
mailing list