Commit 8722d70
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 44affbe commit 8722d70
2 files changed
+44
-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 | | |
| |||
919 | 922 | | |
920 | 923 | | |
921 | 924 | | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
922 | 928 | | |
923 | 929 | | |
924 | 930 | | |
| |||
3309 | 3315 | | |
3310 | 3316 | | |
3311 | 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 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
3312 | 3350 | | |
3313 | 3351 | | |
3314 | 3352 | | |
| |||
3704 | 3742 | | |
3705 | 3743 | | |
3706 | 3744 | | |
| 3745 | + | |
3707 | 3746 | | |
3708 | 3747 | | |
3709 | 3748 | | |
| |||
3817 | 3856 | | |
3818 | 3857 | | |
3819 | 3858 | | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
3820 | 3862 | | |
3821 | 3863 | | |
3822 | 3864 | | |
| |||
| 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