]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
scsi: bsg: add io_uring passthrough handler
authorYang Xiuwei <yangxiuwei@kylinos.cn>
Tue, 17 Mar 2026 07:22:26 +0000 (15:22 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 19 Mar 2026 17:38:24 +0000 (11:38 -0600)
commit7b6d3255e7f8c6df2d21504c47808e3ce84649ac
tree5e9df742596aaba6bf774dce563f3abec7e82455
parenta1e97ce80d9f41d0bb83951d758ff6fe49f3de60
scsi: bsg: add io_uring passthrough handler

Implement the SCSI-specific io_uring command handler for BSG using
struct bsg_uring_cmd.

The handler builds a SCSI request from the io_uring command, maps user
buffers (including fixed buffers), and completes asynchronously via a
request end_io callback and task_work. Completion returns a 32-bit
status and packed residual/sense information via CQE res and res2, and
supports IO_URING_F_NONBLOCK.

Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260317072226.2598233-4-yangxiuwei@kylinos.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/scsi_bsg.c