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 62b48e446dea5ee517d7ddf59f5e12f99428ae26..7c75c887eb4f511616dfdba9fa48068e23832dd7 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);
                        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;
                        }
                }
                                return -1;
                        }
                }