]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/ublk: add UBLK_F_SHMEM_ZC support for loop target
authorMing Lei <ming.lei@redhat.com>
Tue, 31 Mar 2026 15:31:57 +0000 (23:31 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 7 Apr 2026 13:42:23 +0000 (07:42 -0600)
commitec20aa44ac2629943c9b2b5524bcb55d778f746c
tree862bffd9b5e60c95b16517e99692f4ea8a1b0a01
parent166b476b8dee61dc6501f6eb91619d28c3430f75
selftests/ublk: add UBLK_F_SHMEM_ZC support for loop target

Add loop_queue_shmem_zc_io() which handles I/O requests marked with
UBLK_IO_F_SHMEM_ZC. When the kernel sets this flag, the request data
lives in a registered shared memory buffer — decode index + offset
from iod->addr and use the server's mmap as the I/O buffer.

The dispatch check in loop_queue_tgt_rw_io() routes SHMEM_ZC requests
to this new function, bypassing the normal buffer registration path.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://patch.msgid.link/20260331153207.3635125-7-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/file_backed.c