From: Jens Axboe Date: Thu, 13 Feb 2025 15:58:17 +0000 (-0700) Subject: t/io_uring: fix passthrough fixed buffer support X-Git-Tag: fio-3.39~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e2d375856c5a443b340b06a33fb40740dda7fee9;p=fio.git t/io_uring: fix passthrough fixed buffer support 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 --- diff --git a/t/io_uring.c b/t/io_uring.c index eea5fe0a..581cfe53 100644 --- a/t/io_uring.c +++ b/t/io_uring.c @@ -628,7 +628,7 @@ static void init_io_pt(struct submitter *s, unsigned index) 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;