-
Notifications
You must be signed in to change notification settings - Fork 5.8k
JDK-8030048: (fs) Support UserDefinedFileAttributeView/extended attributes on OS X / HFS+ #2017
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
Conversation
Hi @overheadhunter, welcome to this OpenJDK project and thanks for contributing! We do not recognize you as Contributor and need to ensure you have signed the Oracle Contributor Agreement (OCA). If you have not signed the OCA, please follow the instructions. Please fill in your GitHub username in the "Username" field of the application. Once you have signed the OCA, please let us know by writing If you already are an OpenJDK Author, Committer or Reviewer, please click here to open a new issue so that we can record that fact. Please use "Add GitHub user overheadhunter" as summary for the issue. If you are contributing this work on behalf of your employer and your employer has signed the OCA, please let us know by writing |
@overheadhunter The following label will be automatically applied to this pull request:
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. |
/covered This patch is submitted on behalf of Skymatic GmbH, for whom I've recently sent in the signed OCA. |
/covered |
Thank you! Please allow for a few business days to verify that your employer has signed the OCA. Also, please note that pull requests that are pending an OCA check will not usually be evaluated, so your patience is appreciated! |
Webrevs
|
Overall, this looks quite good and is easy to review. I think the additions to BsdNativeDispatcher. will need a round or two of cleanup. They comments about XATTR_NOFOLLOW and other options documented in the man pages are a bit distracting. Also the style and excessive long lines aren't consistent with the existing code (and UnixNativeDispatcher). One thing that we need to decide is whether the additional parameters (position, options) are exposed by BsdNativeDispatcher or not. I think I agree with your approach to have the signature match the methods in LinuxNativeDispatcher as that will make it easier to merge the two implementations later. The comments that XATTR_NOFOLLOW is not applicable and other options not used is distracting and can be removed. |
Just to discuss all options, we could as well hide both params from Java entirely (set them inside of
Sure, but maybe it should be documented somewhere that none of the flags are required for this use case? Or do you think it is reasonable to assume that anyone stumbling upon this code will just look up the system calls' documentation to see what flags might have been possible? |
that don't provide any insights not available on the native methods' man pages
(matching format in LinuxNativeDispatcher.java)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates. I can sponsor once, you'll need to enter "/integrate"
@overheadhunter This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 147 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@AlanBateman) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
@overheadhunter |
Mailing list message from Sebastian Stenzel on nio-dev: Thank you, Alan, for guiding me through the process and reviewing the changes! Regarding the deduplication I already have some ideas and questions, but I think I'll do this in a new thread in a couple of days. |
/integrate |
@AlanBateman Only the author (@overheadhunter) is allowed to issue the |
/sponsor |
@AlanBateman @overheadhunter Since your change was applied there have been 152 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit afd3f78. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Mailing list message from Alan Bateman on nio-dev: On 15/01/2021 20:19, Sebastian Stenzel wrote:
No problem, it's a good contribution for something that the maintainers One issue is that has come up since the commit is that -Alan [1] https://bugs.openjdk.java.net/browse/JDK-8259865 |
This adds support for UserDefinedFileAttributeView on macOS 10.4 and newer.
While the main audience for this will probably be macOS users, the relevant changes take place in (mostly existing) classes carrying BSD in their names as none of this is really macOS-specific.
Code is mostly copied from the Linux implementation except for three differences:
true
fromsupportsFileAttributeView(UserDefinedFileAttributeView.class)
for these two FS types, while for all other types support is determined experimentally inisExtendedAttributesEnabled(...)
UnixConstants.ENOATTR
is added, which seems to be macOS and BSD-specific.As discussed in the mailing list, for ease of tracking changes it is not a goal of this patch to modernize the existing Linux implementation, nor to deduplicate anything.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/2017/head:pull/2017
$ git checkout pull/2017