Skip to content

Revert "fs: avoid lock acquisition after uring init"#7849

Merged
Darksonn merged 1 commit intomasterfrom
revert-7843-uring-lock-removal
Jan 9, 2026
Merged

Revert "fs: avoid lock acquisition after uring init"#7849
Darksonn merged 1 commit intomasterfrom
revert-7843-uring-lock-removal

Conversation

@Darksonn
Copy link
Copy Markdown
Member

@Darksonn Darksonn commented Jan 9, 2026

Please don't add new dependencies without a very strong justification. In the case of once_cell, this is actually a crate we have removed previously when it bumped its MSRV and broke ours.

Reverts #7843

cc @tahmid-23

@Darksonn Darksonn added A-tokio Area: The main tokio crate M-runtime Module: tokio/runtime T-io-uring Topic: Linux io_uring labels Jan 9, 2026
@tahmid-23
Copy link
Copy Markdown
Contributor

no leniency for unstable dep? 🙁 unfortunate that other solutions are uglier

@Darksonn
Copy link
Copy Markdown
Member Author

Darksonn commented Jan 9, 2026

No, sorry. But you can reintroduce our custom OnceCell implementation from #5048 / #7208.

@Darksonn Darksonn merged commit 0913cad into master Jan 9, 2026
95 checks passed
@Darksonn Darksonn deleted the revert-7843-uring-lock-removal branch January 9, 2026 09:15
@tahmid-23
Copy link
Copy Markdown
Contributor

it's insufficient without reimplementing OnceState, requires a private poisoning method.

@Darksonn
Copy link
Copy Markdown
Member Author

Darksonn commented Jan 9, 2026

Could you use our async implementation from tokio::sync::OnceCell? It doesn't seem like it would be an issue to make check_and_init into an async function. If you need to block on init in the IO driver, you can use crate::future::block_on for those cases (but my guess is that the non-async get is sufficient outside of the checks in async fns in tokio::fs).

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-runtime Module: tokio/runtime T-io-uring Topic: Linux io_uring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants