mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
nbd: Add the nbd NBD_DISCONNECT_ON_CLOSE config flag.
If NBD_DISCONNECT_ON_CLOSE is set on a device, then the driver will issue a disconnect from nbd_release if the device has no remaining bdev->bd_openers. Fix ret val so reconfigure with only setting the flag succeeds. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Doron Roberts-Kedes <doronrk@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
ce042c183b
commit
08ba91ee6e
2 changed files with 37 additions and 8 deletions
|
@ -53,6 +53,9 @@ enum {
|
|||
/* These are client behavior specific flags. */
|
||||
#define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on
|
||||
disconnect. */
|
||||
#define NBD_CFLAG_DISCONNECT_ON_CLOSE (1 << 1) /* disconnect the nbd device on
|
||||
* close by last opener.
|
||||
*/
|
||||
|
||||
/* userspace doesn't need the nbd_device structure */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue