Skip to content
Closed
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion env/io_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,6 @@ IOStatus PosixRandomAccessFile::ReadAsync(

// Init failed, platform doesn't support io_uring.
if (iu == nullptr) {
fprintf(stderr, "failed to init io_uring\n");
return IOStatus::NotSupported("ReadAsync: failed to init io_uring");
}

Expand Down
8 changes: 8 additions & 0 deletions env/io_posix.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@
#include <errno.h>
#if defined(ROCKSDB_IOURING_PRESENT)
#include <liburing.h>
#include <pthread.h>
#include <sys/uio.h>

#include <cstdio>

#include "util/string_util.h"

// Compatibility defines for io_uring flags that may not be present in older
// kernel headers. These values are fixed and won't change, so it's safe to
// define them even if the running kernel doesn't support them.
Expand Down Expand Up @@ -341,6 +346,9 @@ inline struct io_uring* CreateIOUring() {
flags |= IORING_SETUP_DEFER_TASKRUN;
int ret = io_uring_queue_init(kIoUringDepth, new_io_uring, flags);
if (ret) {
fprintf(stderr, "CreateIOUring failed: %s (errno=%d), thread=%lu\n",
errnoStr(-ret).c_str(), -ret,
static_cast<unsigned long>(pthread_self()));
delete new_io_uring;
new_io_uring = nullptr;
}
Expand Down
Loading