You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tpool/aio_liburing.cc
+8-2
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,9 @@ class aio_uring final : public tpool::aio
34
34
public:
35
35
aio_uring(tpool::thread_pool *tpool, int max_aio) : tpool_(tpool)
36
36
{
37
-
if (io_uring_queue_init(max_aio, &uring_, 0) != 0)
37
+
if (constauto e= io_uring_queue_init(max_aio, &uring_, 0))
38
38
{
39
-
switch (constauto e= errno) {
39
+
switch (-e) {
40
40
case ENOMEM:
41
41
my_printf_error(ER_UNKNOWN_ERROR,
42
42
"io_uring_queue_init() failed with ENOMEM:"
@@ -57,6 +57,12 @@ class aio_uring final : public tpool::aio
57
57
"(newer than 5.1 required)",
58
58
ME_ERROR_LOG | ME_WARNING);
59
59
break;
60
+
case EPERM:
61
+
my_printf_error(ER_UNKNOWN_ERROR,
62
+
"io_uring_queue_init() failed with EPERM:"
63
+
" sysctl kernel.io_uring_disabled has the value 2, or 1 and the user of the process is not a member of sysctl kernel.io_uring_group. (see man 2 io_uring_setup).",
0 commit comments