Commit 2e13456f authored by Josef Bacik's avatar Josef Bacik Committed by Jens Axboe

nbd: allow multiple disconnects to be sent

There's no reason to limit ourselves to one disconnect message per
socket.  Sometimes networks do strange things, might as well let
sysadmins hit the panic button as much as they want.
Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 82abbea7
...@@ -991,8 +991,7 @@ static int nbd_disconnect(struct nbd_device *nbd) ...@@ -991,8 +991,7 @@ static int nbd_disconnect(struct nbd_device *nbd)
struct nbd_config *config = nbd->config; struct nbd_config *config = nbd->config;
dev_info(disk_to_dev(nbd->disk), "NBD_DISCONNECT\n"); dev_info(disk_to_dev(nbd->disk), "NBD_DISCONNECT\n");
if (!test_and_set_bit(NBD_DISCONNECT_REQUESTED, set_bit(NBD_DISCONNECT_REQUESTED, &config->runtime_flags);
&config->runtime_flags))
send_disconnects(nbd); send_disconnects(nbd);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment