RFR: 8292562: (fc) Use copy_file_range in FileChannel::transferTo on Linux [v2]
Alan Bateman
alanb at openjdk.org
Sat Aug 20 15:54:40 UTC 2022
On Fri, 19 Aug 2022 22:06:24 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> You are correct: `sendfile` succeeds but `copy_file_range` fails with `EBADF` when the destination is appending. I put in a fix for this in the source not to use `copy_file_range` if the target is open for appending. An alternative would be to just ignore `EBADF` if it occurred.
>
> I will add a test next week.
Thanks. The current patch looks okay and I think we can wrap this up once there is a test that exercises transferTo with the destination opened for append.
-------------
PR: https://git.openjdk.org/jdk/pull/9925
More information about the nio-dev
mailing list