]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ublk: support UBLK_AUTO_BUF_REG_FALLBACK
authorMing Lei <ming.lei@redhat.com>
Tue, 20 May 2025 04:54:34 +0000 (12:54 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 20 May 2025 16:24:45 +0000 (10:24 -0600)
commit53f427e7944b4f288866cc4a69835086e0958c6a
tree636765f12a35e020e5a49be736f4c4c3771af26e
parent99c1e4eb6a3fbbec27c7c70e5fce15cdc1422893
ublk: support UBLK_AUTO_BUF_REG_FALLBACK

For UBLK_F_AUTO_BUF_REG, buffer is registered to uring_cmd context
automatically with the provided buffer index. User may provide one wrong
buffer index, or the specified buffer is registered by application already.

Add UBLK_AUTO_BUF_REG_FALLBACK for supporting to auto buffer registering
fallback by completing the uring_cmd and telling ublk server the
register failure via UBLK_AUTO_BUF_REG_FALLBACK, then ublk server still
can register the buffer from userspace.

So we can provide reliable way for supporting auto buffer register.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250520045455.515691-5-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c
include/uapi/linux/ublk_cmd.h