]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: ublk: add ublk_io_buf_idx() for returning io buffer index
authorMing Lei <ming.lei@redhat.com>
Fri, 16 Jan 2026 14:18:50 +0000 (22:18 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 23 Jan 2026 03:05:41 +0000 (20:05 -0700)
commitf1d621b5a04ea41ee90f177db084d00db57e6839
tree68c0361b2a9db431c506dcc0118800667407ec52
parent584709ad5ce359f8b5773eb6af40070412652c51
selftests: ublk: add ublk_io_buf_idx() for returning io buffer index

Since UBLK_F_PER_IO_DAEMON is added, io buffer index may depend on current
thread because the common way is to use per-pthread io_ring_ctx for issuing
ublk uring_cmd.

Add one helper for returning io buffer index, so we can hide the buffer
index implementation details for target code.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
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