A previous commit changed t/io_uring to register a single region for
all of the registered buffers, and while it updated non-passthrough IO
for that change, the passthrough path still sets a specific buffer
index. This makes passthrough with fixed buffers fail for any buffer
but the first one, as it's asking for a buffer that doesn't exist rather
than index the first one. That causes -EFAULT completions.
Ensure the buf_index is set to 0 for passthrough as well.
Fixes:
21f461f8c2b9 ("t/io_uring: register single buffer for whole IO region")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
cmd->data_len = bs;
if (fixedbufs) {
sqe->uring_cmd_flags = IORING_URING_CMD_FIXED;
- sqe->buf_index = index;
+ sqe->buf_index = 0;
}
cmd->nsid = f->nsid;
cmd->opcode = 2;