t/io_uring: verbose error for -95/-EOPNOTSUPP failure
authorJens Axboe <axboe@kernel.dk>
Fri, 1 Feb 2019 05:55:52 +0000 (22:55 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Feb 2019 05:55:52 +0000 (22:55 -0700)
If we fail with this error and polling is enabled, it's because the
file system hosting the file doesn't support polling. Let the user
know.

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

index 62b48e4..7c75c88 100644 (file)
@@ -262,6 +262,8 @@ static int reap_events(struct submitter *s)
                        f->pending_ios--;
                        if (cqe->res != BS) {
                                printf("io: unexpected ret=%d\n", cqe->res);
+                               if (polled && cqe->res == -EOPNOTSUPP)
+                                       printf("Your filesystem doesn't support poll\n");
                                return -1;
                        }
                }