RFR: 8286763: [REDO] (fc) Tune FileChannel.transferFrom()

Alan Bateman alanb at openjdk.java.net
Tue May 17 06:52:33 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)

src/java.base/unix/native/libnio/ch/FileChannelImpl.c line 281:

> 279:         if ((errno == EBADF || errno == EINVAL || errno == EXDEV) &&
> 280:             ((ssize_t)count >= 0))
> 281:             return IOS_UNSUPPORTED_CASE;

I don't think you can return IOS_UNSUPPORTED_CASE for the these cases because it will disable the use of copy_file_range for the everyone and all channels. So I think we'll need to think through whether the append and overlap cases where we checked first or return IOS_UNSUPPORTED_CASE does not disable it for everyone. I think the former is probably better.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8733


More information about the nio-dev mailing list