SIGN IN SIGN UP

rgw/d4n: add io_uring backend for SSD cache

Add an io_uring-based async I/O backend to SSDDriver as an alternative
to libaio, selectable at runtime via rgw_d4n_io_backend_type config.

Architecture:
- Thread-local io_uring rings with IORING_SETUP_SINGLE_ISSUER
- Eventfd-based reaper thread per ring for fully async CQE dispatch:
  submission calls non-blocking io_uring_submit(), releases the
  Completion pointer, and the coroutine suspends.  The reaper thread
  blocks on read(eventfd), reaps CQEs via io_uring_peek_cqe(), and
  resumes the coroutine via ceph::async::post() same pattern as
  libaio's SIGEV_THREAD dispatch.
- IoUringSqeData provides type-erased CQE dispatch (function pointer +
  Completion*), stored as SQE user_data for the reaper to recover.
- O_DIRECT support with proper alignment: offsets aligned down, lengths
  aligned up to IO_BUFFER_ALIGNMENT (4096); reads trim result to the
  originally requested range; writes zero-pad and ftruncate to real
  size; posix_fadvise skipped when O_DIRECT is active.
- Graceful O_DIRECT fallback when the filesystem rejects it (EINVAL).

Config options added:
- rgw_d4n_io_backend_type (libaio|liburing)
- rgw_d4n_io_uring_queue_depth, direct_io, sqpoll, iopoll,
  sq_thread_idle_ms

Signed-off-by: Mark Kogan <mkogan@ibm.com>
M
Mark Kogan committed
5275215c827e62edc34535d289b9b9a118b65279
Parent: df73d18
Committed by Mark Kogan <mkogan@redhat.com> on 8/4/2026, 10:16:54 AM