]> www.infradead.org Git - nvme.git/commit
selftests: ublk: kublk: plumb q_id in io_uring user_data
authorUday Shankar <ushankar@purestorage.com>
Thu, 29 May 2025 23:47:11 +0000 (17:47 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 31 May 2025 20:38:26 +0000 (14:38 -0600)
commitbf098d72696db1a947e72d549ec861dc1092deef
tree109704ad95d514a97db24dbf1ee068b7c9bbc7f7
parentab03a61c66149327e022bdafa5843c6f82be267e
selftests: ublk: kublk: plumb q_id in io_uring user_data

Currently, when we process CQEs, we know which ublk_queue we are working
on because we know which ring we are working on, and ublk_queues and
rings are in 1:1 correspondence. However, as we decouple ublk_queues
from ublk server threads, ublk_queues and rings will no longer be in 1:1
correspondence - each ublk server thread will have a ring, and each
thread may issue commands against more than one ublk_queue. So in order
to know which ublk_queue a CQE refers to, plumb that information in the
associated SQE's user_data.

Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-2-e9d3b119336a@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/fault_inject.c
tools/testing/selftests/ublk/file_backed.c
tools/testing/selftests/ublk/kublk.c
tools/testing/selftests/ublk/kublk.h
tools/testing/selftests/ublk/null.c
tools/testing/selftests/ublk/stripe.c