Skip to content

Conversation

@Michael-Wigham
Copy link

@Michael-Wigham Michael-Wigham commented Jan 13, 2026

What does this PR do?

  • Bumps MSRV to 1.92
    • Applies compiler-suggested std API updates and style cleanups.
    • Modernises internals for newer dependency versions
      • Moves file descriptor handling to OwnedFd/BorrowedFd where appropriate for clearer ownership and safer close semantics.
  • Updates crate dependencies across the workspace, including updating the liburing submodule to 2.13.
  • Updates sysfs probing logic:
    • Stops assuming minor == 0 identifies the parent block device; this is incorrect for partitions and NVMe devices where valid block devices frequently have non-zero minors
    • Adds partition-safe queue discovery (walk-up to find a queue/directory).
    • Makes queue/io_poll optional (if files are missing - assume unsupported) to handle older kernels/drivers and avoid hard failures when sysfs files are absent.
    • Simplifies cached block property access and removes the “probe iopoll by performing an I/O” path from the reactor.
    • Fixes CI failures on partition-backed and virtual block devices where queue/* files are missing or located on the parent disk.
  • spsc_queue changes:
    • Eliminate manual allocation and raw pointer arithmetic for buffer, replacing it with an owned slice.
    • Cleans up lookahead/limit handling and switches head/tail progression to wrapping arithmetic to ensure correctness across wrap boundaries.
    • The underlying queue algorithm remains unchanged; this is a safety and maintainability improvement rather than a semantic change.
  • Cleans up examples and benchmarks:
    • Removes unused hyper timer glue that was generating warnings.
    • Updates the SPSC benchmark to pin producer/consumer threads to CPUs and prints clearer latency/throughput numbers.

Motivation

This is a maintenance PR to keep Glommio building cleanly on modern toolchains and dependency versions, and to unblock CI failures.

Keeping the crate aligned with recent stable Rust:

  • Reduces friction for contributors using current toolchains
  • Prevents accumulating breakage from upstream ecosystem changes
  • Lowers the long-term maintenance cost for future feature work

Notes on behaviour changes

  • Poll-ring eligibility is now determined by sysfs capability values (e.g. queue/io_poll) combined with conservative device gating, rather than probing support via a test DMA read.
  • Sysfs reads are now more defensive:
    • Missing files fall back to safe defaults instead of panicking.
    • This ensures Glommio continues to work on older kernels, non-NVMe devices, and CI environments.

Related issues

No related issues - standalone MR.

Additional Notes

  • No public API changes.
  • Functional behavior is unchanged for NVMe devices with full sysfs support.
  • Behaviour on non-NVMe, virtual, or partition-backed devices avoids runtime and CI failures.
  • The examples workspace is now edition = "2024" to align with the updated toolchain and formatting expectations.
  • The SPSC benchmark output is intended for easier interpretation in CI/local perf runs and is not a functional API change.
    • The new bench also supports comparing different core pairings; on SMT systems, this can highlight differences between sibling vs non-sibling cores.

Checklist

  • [] I have added unit tests to the code I am submitting
  • [] My unit tests cover both failure and success scenarios
  • [] If applicable, I have discussed my architecture

liburing submodule updated 2.13 and fix format errors
- CI/README: MSRV -> 1.92
- sysfs: track queue io_poll support and use it to gate poll ring usage
- spsc_queue: remove raw buffer ptr, use Box<[Slot<T>]> + wrapping indices
Remove more unsafe code from spsc queue.
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.

1 participant