nbd: enable replace socket if only one connection is configured
authorHou Pu <houpu.main@gmail.com>
Fri, 28 Feb 2020 06:40:29 +0000 (01:40 -0500)
committerJens Axboe <axboe@kernel.dk>
Thu, 12 Mar 2020 13:58:39 +0000 (07:58 -0600)
commitd970958b2d24e9a40b685ad82bf26a291d6f1c25
tree5f48a5c5827cea9f3ff93844d4736e929c398938
parent91dfa2dd812acc36eb6c8b5cb703886f450209a1
nbd: enable replace socket if only one connection is configured

Nbd server with multiple connections could be upgraded since
560bc4b (nbd: handle dead connections). But if only one conncection
is configured, after we take down nbd server, all inflight IO
would finally timeout and return error. We could requeue them
like what we do with multiple connections and wait for new socket
in submit path.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Hou Pu <houpu@bytedance.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c