Repository navigation
Improvements for IoUringFile - #8300
Merged
Merged
Conversation
7 of 12 tasks
generall
reviewed
Mar 5, 2026
ffuugoo
force-pushed
the
io-uring-file-improvements
branch
2 times, most recently
from
March 9, 2026 10:56
240bcb8 to
964fc85
Compare
ffuugoo
marked this pull request as ready for review
March 9, 2026 18:24
This comment was marked as resolved.
This comment was marked as resolved.
generall
requested changes
Mar 10, 2026
generall
left a comment
Member
There was a problem hiding this comment.
test fails with alignment error
coszio
reviewed
Mar 11, 2026
generall
approved these changes
Mar 12, 2026
- handle read and write requests more explicitly - assert against partial reads/writes
…ng `IoUringFile` Fix typo
…t for T (#8353) * fix(io_uring): allocate Vec<MaybeUninit<T>> for reads to fix alignment for T Refactor IoUringState::read to take generic T and item_offset/items_length instead of byte_offset/byte_length. Allocate Vec<MaybeUninit<T>> so the kernel writes into correctly aligned memory, then convert to Vec<T> in finalize. Fixes bytemuck::cast_vec alignment panic for types like u64. Made-with: Cursor * refactor(io_uring): only make read/write methods generic, not state or runtime - IoUringState and IoUringRuntime no longer generic over T - read<T>() allocates Vec<MaybeUninit<T>>, transmutes to Vec<MaybeUninit<u8>> for storage - finalize returns ReadBuffer; callers use .into_vec::<T>() to get Vec<T> - Write path unchanged (callers pass bytes via bytemuck::cast_slice) Made-with: Cursor * Cleanup * review n1 * review n2 * fmt --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Roman Titov <[email protected]> Co-authored-by: Andrey Vasnetsov <[email protected]>
generall
force-pushed
the
io-uring-file-improvements
branch
from
March 12, 2026 19:36
1dcb8bf to
5e6d087
Compare
This was referenced Mar 16, 2026
generall
added a commit
that referenced
this pull request
Mar 26, 2026
* Improvements for `IoUringFile` - handle read and write requests more explicitly - assert against partial reads/writes * Implement `read_multi`/`write_multi` * Implement `populate` and `clear_ram_cache` * Rename internal structures as `IoUringSomething` * [ai] Make `UniversalRead`/`UniversalWrite` impl generic over `T` * Handle `io_uring` initialization error * Check that `io_uring` is initialized and supported, when opening `IoUringFile` * fixup! Check that `io_uring` is initialized and supported, when opening `IoUringFile` Fix typo * test for reading u64 from file with uring * fmt * clippy * fix(io_uring): allocate Vec<MaybeUninit<T>> for reads to fix alignment for T (#8353) * fix(io_uring): allocate Vec<MaybeUninit<T>> for reads to fix alignment for T Refactor IoUringState::read to take generic T and item_offset/items_length instead of byte_offset/byte_length. Allocate Vec<MaybeUninit<T>> so the kernel writes into correctly aligned memory, then convert to Vec<T> in finalize. Fixes bytemuck::cast_vec alignment panic for types like u64. Made-with: Cursor * refactor(io_uring): only make read/write methods generic, not state or runtime - IoUringState and IoUringRuntime no longer generic over T - read<T>() allocates Vec<MaybeUninit<T>>, transmutes to Vec<MaybeUninit<u8>> for storage - finalize returns ReadBuffer; callers use .into_vec::<T>() to get Vec<T> - Write path unchanged (callers pass bytes via bytemuck::cast_slice) Made-with: Cursor * Cleanup * review n1 * review n2 * fmt --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Roman Titov <[email protected]> Co-authored-by: Andrey Vasnetsov <[email protected]> * use AHash instead of just hash * add ahash to deps --------- Co-authored-by: Andrey Vasnetsov <[email protected]> Co-authored-by: qdrant-cloud-bot <[email protected]> Co-authored-by: Cursor Agent <[email protected]>
Merged
KShivendu
pushed a commit
that referenced
this pull request
Mar 30, 2026
* Improvements for `IoUringFile` - handle read and write requests more explicitly - assert against partial reads/writes * Implement `read_multi`/`write_multi` * Implement `populate` and `clear_ram_cache` * Rename internal structures as `IoUringSomething` * [ai] Make `UniversalRead`/`UniversalWrite` impl generic over `T` * Handle `io_uring` initialization error * Check that `io_uring` is initialized and supported, when opening `IoUringFile` * fixup! Check that `io_uring` is initialized and supported, when opening `IoUringFile` Fix typo * test for reading u64 from file with uring * fmt * clippy * fix(io_uring): allocate Vec<MaybeUninit<T>> for reads to fix alignment for T (#8353) * fix(io_uring): allocate Vec<MaybeUninit<T>> for reads to fix alignment for T Refactor IoUringState::read to take generic T and item_offset/items_length instead of byte_offset/byte_length. Allocate Vec<MaybeUninit<T>> so the kernel writes into correctly aligned memory, then convert to Vec<T> in finalize. Fixes bytemuck::cast_vec alignment panic for types like u64. Made-with: Cursor * refactor(io_uring): only make read/write methods generic, not state or runtime - IoUringState and IoUringRuntime no longer generic over T - read<T>() allocates Vec<MaybeUninit<T>>, transmutes to Vec<MaybeUninit<u8>> for storage - finalize returns ReadBuffer; callers use .into_vec::<T>() to get Vec<T> - Write path unchanged (callers pass bytes via bytemuck::cast_slice) Made-with: Cursor * Cleanup * review n1 * review n2 * fmt --------- Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: Roman Titov <[email protected]> Co-authored-by: Andrey Vasnetsov <[email protected]> * use AHash instead of just hash * add ahash to deps --------- Co-authored-by: Andrey Vasnetsov <[email protected]> Co-authored-by: qdrant-cloud-bot <[email protected]> Co-authored-by: Cursor Agent <[email protected]>
This was referenced Mar 31, 2026
Merged
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.
Follow-up to #8292.
TODO:
read_multiandwrite_multi*_batchand*_multi(and mayberead_*andwrite_*) impls?populateandclear_ram_cacheUniversalRead/UniversalWriteforTio_uringavailable/supported duringIoUringFile::openVec/VecDequeinIoUringStateinstead ofHashMapAll Submissions:
devbranch. Did you create your branch fromdev?New Feature Submissions:
cargo +nightly fmt --allcommand prior to submission?cargo clippy --workspace --all-featurescommand?Changes to Core Features: