t/io_uring: change fatal map buffers condition with multiple files
authorJens Axboe <axboe@kernel.dk>
Mon, 7 Mar 2022 16:00:14 +0000 (09:00 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 7 Mar 2022 16:00:14 +0000 (09:00 -0700)
It _may_ not work with multiple files/devices, but for most common
cases it will. Just allow it for now with a warning.

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

index 8cf338584c9a823ba60ca24012fcf49d980e2442..ed405fa146f6494db8c21843846eeb14cb78937a 100644 (file)
@@ -349,10 +349,8 @@ static int io_uring_map_buffers(struct submitter *s)
 
        if (do_nop)
                return 0;
-       if (s->nr_files > 1) {
-               fprintf(stderr, "Can't map buffers with multiple files\n");
-               return -1;
-       }
+       if (s->nr_files > 1)
+               fprintf(stdout, "Mapping buffers may not work with multiple files\n");
 
        return syscall(__NR_io_uring_register, s->ring_fd,
                        IORING_REGISTER_MAP_BUFFERS, &map, 1);