diff options
| author | Doron Roberts-Kedes <doronrk@fb.com> | 2018-06-15 17:05:32 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2018-06-20 21:10:06 -0400 |
| commit | 08ba91ee6e2c1c08d3f0648f978cbb5dbf3491d8 (patch) | |
| tree | 2c50d118291ce0b1a2c0a9f58f97f7defab7a33c /include/uapi/linux/nbd.h | |
| parent | ce042c183bcb94eb2919e8036473a1fc203420f9 (diff) | |
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>
Diffstat (limited to 'include/uapi/linux/nbd.h')
| -rw-r--r-- | include/uapi/linux/nbd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/nbd.h b/include/uapi/linux/nbd.h index 85a3fb65e40a..20d6cc91435d 100644 --- a/include/uapi/linux/nbd.h +++ b/include/uapi/linux/nbd.h | |||
| @@ -53,6 +53,9 @@ enum { | |||
| 53 | /* These are client behavior specific flags. */ | 53 | /* These are client behavior specific flags. */ |
| 54 | #define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on | 54 | #define NBD_CFLAG_DESTROY_ON_DISCONNECT (1 << 0) /* delete the nbd device on |
| 55 | disconnect. */ | 55 | disconnect. */ |
| 56 | #define NBD_CFLAG_DISCONNECT_ON_CLOSE (1 << 1) /* disconnect the nbd device on | ||
| 57 | * close by last opener. | ||
| 58 | */ | ||
| 56 | 59 | ||
| 57 | /* userspace doesn't need the nbd_device structure */ | 60 | /* userspace doesn't need the nbd_device structure */ |
| 58 | 61 | ||
