Commit c2f932f
ublk: add UBLK_CMD_TRY_STOP_DEV command
This command is similar to UBLK_CMD_STOP_DEV, but it only stops the
device if there are no active openers for the ublk block device.
If the device is busy, the command returns -EBUSY instead of
disrupting active clients. This allows safe, non-destructive stopping.
Signed-off-by: Yoav Cohen <[email protected]>1 parent c65a43e commit c2f932f
2 files changed
+41
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
| 243 | + | |
| 244 | + | |
242 | 245 | | |
243 | 246 | | |
244 | 247 | | |
| |||
3309 | 3312 | | |
3310 | 3313 | | |
3311 | 3314 | | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
3312 | 3347 | | |
3313 | 3348 | | |
3314 | 3349 | | |
| |||
3704 | 3739 | | |
3705 | 3740 | | |
3706 | 3741 | | |
| 3742 | + | |
3707 | 3743 | | |
3708 | 3744 | | |
3709 | 3745 | | |
| |||
3817 | 3853 | | |
3818 | 3854 | | |
3819 | 3855 | | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
3820 | 3859 | | |
3821 | 3860 | | |
3822 | 3861 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
0 commit comments