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>
Fri, 30 May 2025 13:06:51 +0000 (07:06 -0600)
commitb9c564b74d8aa549d74f97b6a9f429fedb9a4e97
treedacd4ae476f71dec4742b9a2a0e825ef8c9d3670
parentb8af2e5dfcc3314c09a97dabcf6e2b1f644cf820
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