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

fixed descriptor support #222

Closed

Conversation

FrankReh
Copy link
Collaborator

@FrankReh FrankReh commented Feb 3, 2023

Support uring fixed descriptors, often also called direct descriptors by the io_uring man pages.

A step in getting to the support of requests that have fixed descriptors
created so that requests can then be written to make use of fixed
descriptors.
@FrankReh FrankReh requested a review from Noah-Kennedy February 4, 2023 15:23
src/io/shared_fd.rs Outdated Show resolved Hide resolved
@thomasbarrett
Copy link

Awesome! This is another feature I am looking for 😄. This also has interesting implications on the Send semantics of File which should probably be discussed. With normal fds, it is possible to make the File type Send. With fixed fds, I don't believe that the File type can be Send. Would it make sense to make two different File types (e.g. File and FixedFile), one of which uses normal Fds and is Send and one which uses Fixed Fds and is !Send?

@FrankReh
Copy link
Collaborator Author

FrankReh commented Feb 7, 2023

I'm not inclined to want two forms of File, FileFd and FileFixed, unless we find more reasons for letting the compiler differentiate one from the other. Maybe a different method set? Maybe a different lifetime or close semantics?

@FrankReh
Copy link
Collaborator Author

Will have to resolve conflicts tomorrow.

@FrankReh FrankReh marked this pull request as draft February 10, 2023 14:39
@FrankReh
Copy link
Collaborator Author

FrankReh commented Feb 10, 2023

Converted to draft while it relies on my branch for the io-uring dependency.

edit: the io-uring repo has the support for opcode::Close with a Fixed(fd) parameter. Now waiting for a new release to be issued but there's still at least one multi opcode being worked that is probably almost ready so we're holding off.

@FrankReh FrankReh marked this pull request as ready for review February 20, 2023 12:49
@FrankReh
Copy link
Collaborator Author

Replaced by another PR, #256, which has the same code. The diffs against the mainline should be easier to follow.

@FrankReh FrankReh closed this Feb 28, 2023
@FrankReh FrankReh deleted the frankreh/fixed-descriptor-support branch February 28, 2023 17:53
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.

3 participants