Commit e53a18e4 authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Gerd Hoffmann

nbd: don't change socket block during negotiate

The caller might handle non-blocking using coroutine. Leave the choice
to the caller to use a blocking or non-blocking negotiate.
Signed-off-by: default avatarMarc-André Lureau <>
Acked-by: default avatarPaolo Bonzini <>
Signed-off-by: default avatarGerd Hoffmann <>
parent 2302c1ca
......@@ -348,6 +348,7 @@ int nbd_client_session_init(NbdClientSession *client,
int ret;
/* NBD handshake */
ret = nbd_receive_negotiate(sock, client->export_name,
&client->nbdflags, &client->size,
......@@ -443,7 +443,6 @@ int nbd_receive_negotiate(int csock, const char *name, uint32_t *flags,
TRACE("Receiving negotiation.");
rc = -EINVAL;
if (read_sync(csock, buf, 8) != 8) {
......@@ -558,7 +557,6 @@ int nbd_receive_negotiate(int csock, const char *name, uint32_t *flags,
rc = 0;
return rc;
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