mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-23 08:55:56 -04:00
ublk: add UBLK_CMD_DEL_DEV_ASYNC
The current command UBLK_CMD_DEL_DEV won't return until the device is released, this way looks more reliable, but makes userspace more difficult to implement, especially about orders: unmap command buffer(which holds one ublkc reference), ublkc close, io_uring_file_unregister, ublkb close. Add UBLK_CMD_DEL_DEV_ASYNC so that device deletion won't wait release, then userspace needn't worry about the above order. Actually both loop and nbd is deleted in this async way. Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20240223075539.89945-3-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -49,6 +49,8 @@
|
||||
_IOR('u', UBLK_CMD_GET_DEV_INFO2, struct ublksrv_ctrl_cmd)
|
||||
#define UBLK_U_CMD_GET_FEATURES \
|
||||
_IOR('u', 0x13, struct ublksrv_ctrl_cmd)
|
||||
#define UBLK_U_CMD_DEL_DEV_ASYNC \
|
||||
_IOR('u', 0x14, struct ublksrv_ctrl_cmd)
|
||||
|
||||
/*
|
||||
* 64bits are enough now, and it should be easy to extend in case of
|
||||
|
||||
Reference in New Issue
Block a user