Repository navigation
fix: retain caller resources until native read completion - #20
Merged
Merged
Conversation
houseme
marked this pull request as ready for review
November 30, 2026 15:24
houseme
approved these changes
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A resource lease kept in the caller future is released when that future is dropped, even while io_uring still owns the read. This adds an opt-in owner that follows the read through admission, submission, and final completion. It is needed by the physical-disk admission work in rustfs/rustfs#8911.
The owner moves through the existing queue and pending table without a new per-read allocation or task. It survives cancellation and request-runtime shutdown, stays retained if bounded shutdown cannot resolve the read, and never follows the returned bytes. Existing driver constructors and read request literals keep their current API through unit-owner aliases.
Validation: the original caller-owned pattern failed the native cancellation regression on Linux. The ownership change passed all 156 tests with all features on Linux 6.17/XFS, with no skips, plus 8 ownership tests in a default build. After replacing a deprecated atomic alias with its equivalent method, all 95 unit/shared-budget tests passed again. Formatting, strict Clippy, and rustdoc passed. The replacement atomic method is available below the existing minimum Rust version; no lint allowance or version bump was added.
Review: two sequential passes covered ownership/error paths, cancellation and shutdown, API compatibility, allocation behavior, and regression coverage. No unresolved findings in the change. This PR supplies the driver primitive; RustFS integration and workload performance acceptance are separate.