aboutsummaryrefslogtreecommitdiff
path: root/block/nbd-client.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2013-12-01 22:23:42 +0100
committerGerd Hoffmann <kraxel@redhat.com>2013-12-16 10:12:20 +0100
commite53a18e488c657bbc6f218ae60de8e813a912667 (patch)
treea34d0514b9d7530e894177ebc4e6df3aec1262a2 /block/nbd-client.c
parent2302c1cafb13df23938b098d9c6595de52ec2577 (diff)
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: Marc-André Lureau <marcandre.lureau@redhat.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'block/nbd-client.c')
-rw-r--r--block/nbd-client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/nbd-client.c b/block/nbd-client.c
index 1abfc6a7f5..693110d26d 100644
--- a/block/nbd-client.c
+++ b/block/nbd-client.c
@@ -348,6 +348,7 @@ int nbd_client_session_init(NbdClientSession *client,
int ret;
/* NBD handshake */
+ qemu_set_block(sock);
ret = nbd_receive_negotiate(sock, client->export_name,
&client->nbdflags, &client->size,
&client->blocksize);