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 support for fallocate and statx #214

Merged
merged 4 commits into from
Jan 19, 2023

Conversation

hellertime
Copy link
Contributor

This PR adds support for both the IORING_OP_FALLOCATE and the IORING_OP_STATX opcodes, and extends File to expose fallocate() and statx() methods.

A basic test which uses both fallocate and statx is included as well.

Copy link
Collaborator

@FrankReh FrankReh left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me. @Noah-Kennedy ? (I have not experience with fallocate or statx.)

src/io/statx.rs Outdated Show resolved Hide resolved
src/io/statx.rs Outdated Show resolved Hide resolved
@FrankReh
Copy link
Collaborator

FrankReh commented Jan 19, 2023

Also, @hellertime, have you seen this work in your setup? I don't see a need to wait for @Noah-Kennedy. Thanks!

Copy link
Collaborator

@FrankReh FrankReh left a comment

Choose a reason for hiding this comment

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

Nice comments and thanks for the unit test too.

@hellertime
Copy link
Contributor Author

I've run the tests cases on my hardware (AMD EPYCs running Ubuntu 22.04) , if thats what you mean. I've not yet integrated this into the code I was porting though.

@FrankReh FrankReh merged commit ecff6a9 into tokio-rs:master Jan 19, 2023
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