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

enable/disable O_DIRECT #12

Open
thomasjungblut opened this issue Oct 29, 2021 · 1 comment
Open

enable/disable O_DIRECT #12

thomasjungblut opened this issue Oct 29, 2021 · 1 comment

Comments

@thomasjungblut
Copy link

Hey there,

thanks for this awesome library! I was playing around with this today a bit.

I do have a somewhat silly requirement in that some writes may not be aligned with the block size (forced flushes/fsyncs out of my control). On Linux it's fairly easy to toggle O_DIRECT on and off through fcntl, I assume on MAC it works the same using F_NOCACHE.

Now I'm currently browsing the win APIs, but I don't find anything similar. Do you have a clue?

Would you be ok if I'd send you a PR for such a feature?

@ncw
Copy link
Owner

ncw commented Jan 18, 2022

Sorry for the delay in responding!

If you wanted to send a PR like that it would be fine with me, however it would need to work on all platforms or possibly give an error if not supported. Any idea about Windows support?

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

No branches or pull requests

2 participants