From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnE4b-0005tE-GF for qemu-devel@nongnu.org; Sun, 01 Dec 2013 15:57:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnE4V-0008SC-Dh for qemu-devel@nongnu.org; Sun, 01 Dec 2013 15:57:01 -0500 Received: from mx3-phx2.redhat.com ([209.132.183.24]:39042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnE4V-0008S3-5h for qemu-devel@nongnu.org; Sun, 01 Dec 2013 15:56:55 -0500 Date: Sun, 1 Dec 2013 15:56:51 -0500 (EST) From: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Message-ID: <2000707663.3634341.1385931411101.JavaMail.root@redhat.com> In-Reply-To: <529A37A6.3020906@redhat.com> References: <1385737124-13964-1-git-send-email-marcandre.lureau@gmail.com> <1385737124-13964-10-git-send-email-marcandre.lureau@gmail.com> <5298B152.10805@redhat.com> <529A37A6.3020906@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 09/13] nbd: don't change socket block during negotiate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , qemu-devel@nongnu.org, Gerd Hoffmann ----- Original Message ----- > Il 30/11/2013 16:49, Marc-Andr=C3=A9 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. > >=20 > > 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 *clien= t, > > int ret; > >=20 > > /* NBD handshake */ > > + qemu_set_block(sock); > > ret =3D nbd_receive_negotiate(sock, client->export_name, > > &client->nbdflags, &client->size, > > &client->blocksize); >=20 > Also >=20 > qemu_set_nonblock(sock); >=20 > here,=20 It's already a few lines below. > and remove it from nbd_receive_negotiate. > I checked again and you need not touch unix_connect_opts, nor > nbd_client_thread. Ok, I'll remove those.