t/io_uring: ensure to use the right opcode for fixed buffers
authorJens Axboe <axboe@kernel.dk>
Tue, 8 Jan 2019 17:26:47 +0000 (10:26 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Jan 2019 17:58:55 +0000 (10:58 -0700)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/io_uring.c

index 6405536006ce3ff7386d6da26137196b2c770ca0..fb2654a32234d45bab8a94b7a1447db2101dc08f 100644 (file)
@@ -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;