t/io_uring: fix passthrough fixed buffer support
authorJens Axboe <axboe@kernel.dk>
Thu, 13 Feb 2025 15:58:17 +0000 (08:58 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Feb 2025 15:58:17 +0000 (08:58 -0700)
commite2d375856c5a443b340b06a33fb40740dda7fee9
treeb4de8c20afd07d7985d870cba288446b4e391c65
parent0e0d9a3a3a0aec52836d32d749d4f838b673d73c
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 <axboe@kernel.dk>
t/io_uring.c