]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ublk: add io events fifo structure
authorMing Lei <ming.lei@redhat.com>
Fri, 16 Jan 2026 14:18:39 +0000 (22:18 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 23 Jan 2026 03:05:40 +0000 (20:05 -0700)
commitf1f99ddf607a4b54dc19d92fb07f2a30c131ee56
tree59e04210289424b23e86022a21c0ded41921a5e6
parent1e500e106d5a82280db59dba06f0108085beba65
ublk: add io events fifo structure

Add ublk io events fifo structure and prepare for supporting command
batch, which will use io_uring multishot uring_cmd for fetching one
batch of io commands each time.

One nice feature of kfifo is to allow multiple producer vs single
consumer. We just need lock the producer side, meantime the single
consumer can be lockless.

The producer is actually from ublk_queue_rq() or ublk_queue_rqs(), so
lock contention can be eased by setting proper blk-mq nr_queues.

Reviewed-by: Caleb Sander Mateos <csander@purestorage.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c