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

add O_DIRECT for Linux x86_64 and aarch64 (#107) #108

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

Conversation

tmancill
Copy link

@tmancill tmancill commented May 4, 2022

Hi @headius . Thank you for the quick response. The constants generated match the bitmasks we ended up hardcoding into our application for O_DIRECT, so the values have been tested in situ.

A few comments/questions (somewhat) related to this PR:

  1. The regen:platform resulted in updates to AddressFamily.java and ProtocolFamily.java on Linux x86_64 and aarch64. Since they aren't directly related to this change, I left them out. Should I include them? Should I submit a separate PR?

  2. When I run on Apple M1 (uname -sm -> Darwin arm64), it creates a new directory src/main/java/jnr/constants/platform/darwin/x86_64/. I was expecting it to generate darwin/aarch64. I assume this is a quirk of the M1. O_DIRECT isn't defined on Darwin, so it doesn't matter for this PR anyway.

  3. When I ran rake regen:lplatform on Linux x86_64, it creates a new folder src/main/java/jnr/constants/platform/linux/x86_64/, which seems correct. Running rake regen:platform updates ``src/main/java/jnr/constants/platform/linux/`. Is the use of the latter a convention?

@ahorek
Copy link
Contributor

ahorek commented Jul 7, 2022

btw https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyFile.java#L198 should be updated as well to make it available from JRuby

File::DIRECT => 16384

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants