Skip to content

implement unlink io-uring call to implement remove_file and remove_dir#7799

Open
vrtgs wants to merge 1 commit intotokio-rs:masterfrom
vrtgs:io-uring-unlink
Open

implement unlink io-uring call to implement remove_file and remove_dir#7799
vrtgs wants to merge 1 commit intotokio-rs:masterfrom
vrtgs:io-uring-unlink

Conversation

@vrtgs
Copy link
Contributor

@vrtgs vrtgs commented Dec 26, 2025

implement io-uring unlink.

note that we can't use this to implement remove_dir_all because there is no way to read directory entries uring io-uring and reading entries is a blocking operation

@ADD-SP ADD-SP added A-tokio Area: The main tokio crate M-fs Module: tokio/fs labels Dec 27, 2025
@martin-g martin-g added the T-io-uring Topic: Linux io_uring label Dec 29, 2025
Copy link
Member

@ADD-SP ADD-SP left a comment

Choose a reason for hiding this comment

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

Could you add tests?

@ADD-SP ADD-SP added the S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. label Dec 29, 2025
@ADD-SP ADD-SP requested a review from Daksh14 December 29, 2025 12:46

impl Op<Unlink> {
/// Submit a request to open a file.
pub(crate) fn unlink(path: &Path, directory: bool) -> io::Result<Op<Unlink>> {
Copy link
Contributor

@Daksh14 Daksh14 Dec 29, 2025

Choose a reason for hiding this comment

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

We can have remove_dir and remove_file and you can ask for flags in the argument, its not apparent what the directory bool is going to do

Copy link
Contributor

@Daksh14 Daksh14 left a comment

Choose a reason for hiding this comment

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

Thank you! Tests are welcome

@vrtgs vrtgs force-pushed the io-uring-unlink branch 2 times, most recently from eaa378c to 851dbfc Compare January 5, 2026 16:31
@vrtgs
Copy link
Contributor Author

vrtgs commented Jan 5, 2026

Thank you! Tests are welcome

I would love to, but I have 0 clue how the testing is structured around here, I was digging around a little, and I couldn't figure it out at a glance, I have finals currently so I ask for your patience on this request

@ADD-SP ADD-SP added S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. and removed S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. labels Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tokio Area: The main tokio crate M-fs Module: tokio/fs S-waiting-on-author Status: awaiting some action (such as code changes) from the PR or issue author. T-io-uring Topic: Linux io_uring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants