Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8343785: (fs) Remove syscalls that set file times with microsecond precision #21989

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bplb
Copy link
Member

@bplb bplb commented Nov 8, 2024

Remove the syscalls utimes, futimes, and lutimes that set the file access and modification times using microsecond precision.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8343785: (fs) Remove syscalls that set file times with microsecond precision (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21989/head:pull/21989
$ git checkout pull/21989

Update a local copy of the PR:
$ git checkout pull/21989
$ git pull https://git.openjdk.org/jdk.git pull/21989/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21989

View PR using the GUI difftool:
$ git pr show -t 21989

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21989.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 8, 2024

👋 Welcome back bpb! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 8, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@bplb
Copy link
Member Author

bplb commented Nov 8, 2024

@TheRealMDoerr , @RealCLanger If this will eventually be integrated, it would be good if there were some testing on AIX before then. I don't think I've touched any AIX specific code, but one can't be too careful. Thanks.

@openjdk openjdk bot added the rfr Pull request is ready for review label Nov 8, 2024
@openjdk
Copy link

openjdk bot commented Nov 8, 2024

@bplb The following label will be automatically applied to this pull request:

  • nio

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@mlbridge
Copy link

mlbridge bot commented Nov 8, 2024

Webrevs

lutimes(path, accessValue, modValue);
else
futimens(fd, accessValue, modValue);
UnixFileAttributes attrs = UnixFileAttributes.get(path, followLinks);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use openForAttributeAccess if possible. If lastModifiedTime or lastAccessTime is not provided then it ensures that this method will only access one file to avoid racing with concurrent changes on the file system.

int commonattr = UnixConstants.ATTR_CMN_CRTIME;
try {
setattrlist(path, commonattr, 0L, 0L, createValue,
followLinks ? 0 : UnixConstants.FSOPT_NOFOLLOW);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
followLinks ? 0 : UnixConstants.FSOPT_NOFOLLOW);
followLinks ? 0 : UnixConstants.FSOPT_NOFOLLOW);

@TheRealMDoerr
Copy link
Contributor

The included test has passed on linuxppc64le, but is disabled for AIX. At least the build has worked on AIX. We should try other tests.

@bplb
Copy link
Member Author

bplb commented Nov 12, 2024

The included test has passed on linuxppc64le, but is disabled for AIX.

I guess we should add os.family = "aix" to the @requires.

At least the build has worked on AIX.

Good. Thanks for checking.

We should try other tests.

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nio [email protected] rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

4 participants