vhost-user-blk: reconnect on any error during realize
commitb7107e758f4ecdd8f07ede3f093cbbfdb623e865
authorRoman Kagan <rvkagan@yandex-team.ru>
Thu, 11 Nov 2021 15:33:45 +0000 (11 18:33 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 7 Jan 2022 10:19:55 +0000 (7 05:19 -0500)
tree983be3132011416294690a6db10767bee7191076
parentdeeb956c40e3b6f8ab95f7b53f148a836cf93da2
vhost-user-blk: reconnect on any error during realize

vhost-user-blk realize only attempts to reconnect if the previous
connection attempt failed on "a problem with the connection and not an
error related to the content (which would fail again the same way in the
next attempt)".

However this distinction is very subtle, and may be inadvertently broken
if the code changes somewhere deep down the stack and a new error gets
propagated up to here.

OTOH now that the number of reconnection attempts is limited it seems
harmless to try reconnecting on any error.

So relax the condition of whether to retry connecting to check for any
error.

This patch amends a527e312b5 "vhost-user-blk: Implement reconnection
during realize".

Signed-off-by: Roman Kagan <rvkagan@yandex-team.ru>
Message-Id: <20211111153354.18807-2-rvkagan@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
hw/block/vhost-user-blk.c