8375294: (fs) Files.copy can fail with EOPNOTSUPP when copy_file_range not supported#2801
8375294: (fs) Files.copy can fail with EOPNOTSUPP when copy_file_range not supported#2801judovana wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back jvanek! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
This backport pull request has now been updated with issue from the original commit. |
|
|
Webrevs
|
|
/approval request Hard to reproduce issue happening after upgrading to jdk 21 from jdk17 in OpenShift with CNSA persistent storage when accessing data stored on GPFS was tracked to the backported patch |
I was able to get it tested in reproducing environment, and it fixed the issue without any other backports. |
|
/reviewers 1 reviewer |
|
@gnu-andrew |
gnu-andrew
left a comment
There was a problem hiding this comment.
This is a regression caused by JDK-8264744 which caused Linux platforms to try copy_file_range first. The effect of this patch is to cause it to return IOS_UNSUPPORTED_CASE from transferFrom0 and to try sendfile64 in the transferTo0 case i.e. what it was doing in 17u and earlier by default. At present, both fail with an IOException. It already uses sendfile64 in the case of EINVAL, ENOSYS and EXDEV so this is just handling an additional error code thrown by some calls.
Backport is clean bar copyright headers and change seems low risk. sendfile64 will be tried in some additional cases, but this was already the case for those back in 17u.
|
I'm not sure where you get this list of other changes from - just those that have changed the copyright header? - but they are not necessary for this change. |
Yes, the only manual touch was the copyright header. But when I was setting that, I was curious why. The three enumerated changes are touching the the files. If the surrounding of the patch would be more +-3, it would not be clean, so I considered as worthy to mention. Sorry for confusion. |
Hi all,
This pull request contains a backport of commit 30cda000 from the openjdk/jdk repository.
The commit being backported was authored by Brian Burkhalter on 15 Jan 2026 and was reviewed by Alan Bateman and Jaikiran Pai.
Thanks!
This backport was clean, except of the copyright header.
Compared to clean backport to jdk25 and 26, jdk21 is missng
As per myself, they are not necessary for this PR to do what it should. If you want any of them to go with/before/after, let me know
Progress
Error
- [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/2801/head:pull/2801$ git checkout pull/2801Update a local copy of the PR:
$ git checkout pull/2801$ git pull https://git.openjdk.org/jdk21u-dev.git pull/2801/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2801View PR using the GUI difftool:
$ git pr show -t 2801Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/2801.diff
Using Webrev
Link to Webrev Comment