From 130d49baa50655729f09efb72e77bebf09421dd7 Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Thu, 10 Jun 2021 13:07:49 +0300 Subject: nbd/client-connection: add possibility of negotiation Add arguments and logic to support nbd negotiation in the same thread after successful connection. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20210610100802.5888-20-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- block/nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block') diff --git a/block/nbd.c b/block/nbd.c index 26914509f1..df9d241313 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -357,7 +357,7 @@ static coroutine_fn void nbd_reconnect_attempt(BDRVNBDState *s) s->ioc = NULL; } - s->sioc = nbd_co_establish_connection(s->conn, NULL); + s->sioc = nbd_co_establish_connection(s->conn, NULL, NULL, NULL); if (!s->sioc) { ret = -ECONNREFUSED; goto out; @@ -2035,7 +2035,7 @@ static int nbd_open(BlockDriverState *bs, QDict *options, int flags, goto fail; } - s->conn = nbd_client_connection_new(s->saddr); + s->conn = nbd_client_connection_new(s->saddr, false, NULL, NULL, NULL); /* * establish TCP connection, return error if it fails -- cgit v1.2.3-55-g7522