From fb191295af1ca14504b64ebe321e126c8019bdc3 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 8 Jan 2019 10:26:47 -0700 Subject: [PATCH] t/io_uring: ensure to use the right opcode for fixed buffers Signed-off-by: Jens Axboe --- t/io_uring.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/io_uring.c b/t/io_uring.c index 64055360..fb2654a3 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -107,7 +107,10 @@ static void init_io(struct submitter *s, int fd, unsigned index) lrand48_r(&s->rand, &r); offset = (r % (s->max_blocks - 1)) * BS; - iocb->opcode = IORING_OP_READ; + if (fixedbufs) + iocb->opcode = IORING_OP_READ_FIXED; + else + iocb->opcode = IORING_OP_READ; iocb->flags = 0; iocb->ioprio = 0; iocb->fd = fd; -- 2.25.1