X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Fio_uring.c;h=5fda2fc96fea8f88914083f5cb9e5d9ff962d580;hb=919850d217e139b4f82f9798893cc816a7435e44;hp=8c5d9deb65ab327392e2c0e948d32a9b785a09b4;hpb=2b9415ddc260726c3ea9ae3436826f9181811143;p=fio.git diff --git a/engines/io_uring.c b/engines/io_uring.c index 8c5d9deb..5fda2fc9 100644 --- a/engines/io_uring.c +++ b/engines/io_uring.c @@ -154,7 +154,7 @@ static int fio_ioring_prep(struct thread_data *td, struct io_u *io_u) sqe->opcode = IORING_OP_READ_FIXED; else sqe->opcode = IORING_OP_WRITE_FIXED; - sqe->addr = io_u->xfer_buf; + sqe->addr = (unsigned long) io_u->xfer_buf; sqe->len = io_u->xfer_buflen; sqe->buf_index = io_u->index; } else { @@ -162,7 +162,7 @@ static int fio_ioring_prep(struct thread_data *td, struct io_u *io_u) sqe->opcode = IORING_OP_READV; else sqe->opcode = IORING_OP_WRITEV; - sqe->addr = &ld->iovecs[io_u->index]; + sqe->addr = (unsigned long) &ld->iovecs[io_u->index]; sqe->len = 1; } sqe->off = io_u->offset; @@ -478,13 +478,8 @@ static int fio_ioring_queue_init(struct thread_data *td) ld->ring_fd = ret; if (o->fixedbufs) { - struct io_uring_register_buffers reg = { - .iovecs = ld->iovecs, - .nr_iovecs = depth - }; - ret = syscall(__NR_sys_io_uring_register, ld->ring_fd, - IORING_REGISTER_BUFFERS, ®); + IORING_REGISTER_BUFFERS, ld->iovecs, depth); if (ret < 0) return ret; }