Commit 13fe8e6
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>1 parent 1221b9e commit 13fe8e6
2 files changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2468 | 2468 | | |
2469 | 2469 | | |
2470 | 2470 | | |
2471 | | - | |
| 2471 | + | |
2472 | 2472 | | |
2473 | 2473 | | |
2474 | 2474 | | |
| |||
2502 | 2502 | | |
2503 | 2503 | | |
2504 | 2504 | | |
2505 | | - | |
| 2505 | + | |
2506 | 2506 | | |
2507 | 2507 | | |
2508 | 2508 | | |
| |||
2901 | 2901 | | |
2902 | 2902 | | |
2903 | 2903 | | |
2904 | | - | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
2905 | 2908 | | |
2906 | 2909 | | |
2907 | 2910 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
0 commit comments