qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 09/13] nbd: don't change socket block during neg


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 09/13] nbd: don't change socket block during negotiate
Date: Sat, 30 Nov 2013 20:08:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 30/11/2013 16:49, Marc-André Lureau ha scritto:
> So you suggest this block/unblock: (I haven't reviewed all callers of
> unix_connect_opts(), I am not sure that's what you meant) Other option
> would be to move the nonblock to unix_socket_outgoing.
> 
> diff --git a/block/nbd-client.c b/block/nbd-client.c
> index 1abfc6a..693110d 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);

Also

 qemu_set_nonblock(sock);

here, and remove it from nbd_receive_negotiate.

I checked again and you need not touch unix_connect_opts, nor
nbd_client_thread.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]