Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/io/uring/Ring.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,21 @@ Ring::Ring(unsigned entries, unsigned flags)
if (int error = io_uring_queue_init(entries, &ring, flags);
error < 0)
throw MakeErrno(-error, "io_uring_queue_init() failed");
#if !IO_URING_CHECK_VERSION(2, 10)
// Intentionally ignore the error code, as this is only supported on Linux 6.15+
(void) io_uring_set_iowait(&ring, false);
#endif
}

Ring::Ring(unsigned entries, struct io_uring_params &params)
{
if (int error = io_uring_queue_init_params(entries, &ring, &params);
error < 0)
throw MakeErrno(-error, "io_uring_queue_init_params() failed");
#if !IO_URING_CHECK_VERSION(2, 10)
// Intentionally ignore the error code, as this is only supported on Linux 6.15+
(void) io_uring_set_iowait(&ring, false);
#endif
}

void
Expand Down
Loading