block/nbd: nbd_channel_error() shutdown channel unconditionally
commitcb116da7d722f1c5fbb32c818817aef0f576772d
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thu, 2 Sep 2021 10:38:01 +0000 (2 13:38 +0300)
committerEric Blake <eblake@redhat.com>
Wed, 29 Sep 2021 18:46:33 +0000 (29 13:46 -0500)
tree9a0c1bf53cd015f64d96f3318b6b9c1872a256a6
parentf7ca4aadca865898ef9c52d75f142a9db622c712
block/nbd: nbd_channel_error() shutdown channel unconditionally

Don't rely on connection being totally broken in case of -EIO. Safer
and more correct is to just shut down the channel anyway, since we
change the state and plan on reconnecting.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20210902103805.25686-2-vsementsov@virtuozzo.com>
[eblake: grammar tweaks]
Signed-off-by: Eric Blake <eblake@redhat.com>
block/nbd.c