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

Make library O_DIRECT compatible #13

Closed
wants to merge 1 commit into from

Conversation

squimrel
Copy link
Contributor

@squimrel squimrel commented Jun 19, 2017

Also fixes a memory leak.

@bcl
Copy link
Collaborator

bcl commented Jun 30, 2017

Can you explain the need for these changes? I'm not sure about them at first glance, and am reluctant to do things like writing more than is needed. Also it would be good to break the leak fix out into a separate commit.

@squimrel squimrel mentioned this pull request Jun 30, 2017
@squimrel squimrel force-pushed the odirect branch 2 times, most recently from dccccc0 to 50bc807 Compare June 30, 2017 21:19
@squimrel
Copy link
Contributor Author

squimrel commented Jun 30, 2017

When a file (or even a block device) is opened with the O_DIRECT flag (too minimize cache effects) all buffers, seek, read and write operations have to be block aligned.
This patch makes sure that this is the case.

Specific use-case:
I use udisks to get a file descriptor of a block device (which they open with the O_DIRECT flag) and I'd like to pass that into isomd5sum.

Don't merge this one I start to really dislike most of this patch.

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