Received: from eggs.gnu.org ([2001:4830:134:3::10]:51793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c3pYg-00083X-FD for qemu-devel@nongnu.org; Mon, 07 Nov 2016 14:26:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c3pYd-000826-CR for qemu-devel@nongnu.org; Mon, 07 Nov 2016 14:26:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56858) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c3pYd-00081T-5A for qemu-devel@nongnu.org; Mon, 07 Nov 2016 14:26:15 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 426DF3D96C for ; Mon, 7 Nov 2016 19:26:14 +0000 (UTC) References: <1478075542-18904-1-git-send-email-pbonzini@redhat.com> From: Eric Blake Message-ID: Date: Mon, 7 Nov 2016 13:26:13 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8w3i1HLKqhXCgnrAnvs3ILinVBpONTvDM" Subject: Re: [Qemu-devel] [PULL v3 00/30] Misc patches for 2016-10-31 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , Paolo Bonzini , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8w3i1HLKqhXCgnrAnvs3ILinVBpONTvDM From: Eric Blake To: Max Reitz , Paolo Bonzini , qemu-devel@nongnu.org Message-ID: Subject: Re: [Qemu-devel] [PULL v3 00/30] Misc patches for 2016-10-31 References: <1478075542-18904-1-git-send-email-pbonzini@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/04/2016 05:02 PM, Max Reitz wrote: >> nbd: Let client skip portions of server reply >=20 > This patch (7d3123e1775) breaks iotest 083 (it hangs somewhere). Adding this breaks the infinite loop: diff --git i/nbd/client.c w/nbd/client.c index 5d94e34..23ad4f1 100644 --- i/nbd/client.c +++ w/nbd/client.c @@ -87,10 +87,11 @@ static ssize_t drop_sync(QIOChannel *ioc, size_t size= ) while (size > 0) { ret =3D read_sync(ioc, buffer, MIN(65536, size)); if (ret < 0) { goto cleanup; } + assert(ret); assert(ret <=3D size); size -=3D ret; } ret =3D dropped; but then fails the assertion, which means read_sync() is returning 0 in our particular test (which sort of makes sense: the test is purposefully truncating the server stream at various points to see how the client reacts). I'm trying to figure out if always treating early EOF as a read error would be sufficient to make things work the way we want in the client. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --8w3i1HLKqhXCgnrAnvs3ILinVBpONTvDM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJYINVVAAoJEKeha0olJ0Nqld0H/1bMO+DQ3nQZvyukbmnFSmxB pfhCSXiXiUY3SQw7VtPRrSGt6FZPNwOUfvLcxL6vKBezR8A92yi0WdCzXfNF+WbC gfieWHrVgQZYcPwc7oHZde4IwFUJ4cvrbFFFVx3FH+Es6eL6csj54QxIAzaQ32Fx nPNnliL0ouGwSUSiyhgiyWsZ7kTxN3Zkm2Su7SZFjTXUm9mu/2p0J7XWx8ksgKHi qACg9dKBqRVfQJFniAQ5YiElc7Z43oNFL98IbGhtDJVHSgUqHm00dXqgRxQyyP4N oR5nDgZ7dCwkTN65/WBHV6B9gk6m24uOPGT6GJRYo13A6yMafQYb/wiVbJqt+TQ= =NQVl -----END PGP SIGNATURE----- --8w3i1HLKqhXCgnrAnvs3ILinVBpONTvDM--