mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-02 15:53:42 +00:00
nbd: Add the nbd NBD_DISCONNECT_ON_CLOSE config flag.
[ Upstream commit 08ba91ee6e ]
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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
473c7b01ff
commit
b043ccf739
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user