engines/io_uring: add verbose error for ENOSYS
authorJens Axboe <axboe@kernel.dk>
Tue, 16 Feb 2021 19:07:14 +0000 (12:07 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 16 Feb 2021 19:07:14 +0000 (12:07 -0700)
If we get ENOSYS for setting up the rings, then the kernel is too old
to support io_uring. Mention that explicitly.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/io_uring.c

index 9ce2ae80df59f54dea66630b1182bc7b5fec35e3..c9036ba079b808b65f15a7d3ea920424018471ca 100644 (file)
@@ -696,7 +696,11 @@ static int fio_ioring_post_init(struct thread_data *td)
 
        err = fio_ioring_queue_init(td);
        if (err) {
-               td_verror(td, errno, "io_queue_init");
+               int __errno = errno;
+
+               if (__errno == ENOSYS)
+                       log_err("fio: your kernel doesn't support io_uring\n");
+               td_verror(td, __errno, "io_queue_init");
                return 1;
        }