]> git.baikalelectronics.ru Git - kernel.git/commit
nbd: Add the nbd NBD_DISCONNECT_ON_CLOSE config flag.
authorDoron Roberts-Kedes <doronrk@fb.com>
Fri, 15 Jun 2018 21:05:32 +0000 (14:05 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Jun 2018 01:10:06 +0000 (19:10 -0600)
commit50b8a8e3246c0b7a7a0715f7926496ca981a517d
tree2c50d118291ce0b1a2c0a9f58f97f7defab7a33c
parent0aee153fe31b7d7399baa741a887abcba1a1ccba
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>
drivers/block/nbd.c
include/uapi/linux/nbd.h