RFR: 8310902: (fc) FileChannel.transferXXX async close and interrupt issues [v3]

Brian Burkhalter bpb at openjdk.org
Wed Jun 28 19:09:54 UTC 2023


On Wed, 28 Jun 2023 18:34:47 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java line 657:
>> 
>>> 655:                     long n = transferToFileDescriptor(position, count, target.fd);
>>> 656:                     if (n == IOStatus.UNSUPPORTED_CASE) {
>>> 657:                         transferToFileDirectNotSupported = true;
>> 
>> On Linux, `transferToFileDescriptor` will fail with `UNSUPPORTED_CASE` if the target is open for appending. I don't think that this should mean that all future fast transfers to a file should be suppressed.
>
> I'll check it but all I've really done here is rename fileSupported to transferToFileDirectNotSupported and inverted the values.

In that case the situation did not change and whether it poses a problem could be investigated under another issue.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14656#discussion_r1245642266


More information about the nio-dev mailing list