[Top][All Lists]

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

Re: [Qemu-devel] [PULL v3 00/30] Misc patches for 2016-10-31

From: Eric Blake
Subject: Re: [Qemu-devel] [PULL v3 00/30] Misc patches for 2016-10-31
Date: Mon, 7 Nov 2016 13:26:13 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 11/04/2016 05:02 PM, Max Reitz wrote:

>>       nbd: Let client skip portions of server reply
> 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 = read_sync(ioc, buffer, MIN(65536, size));
         if (ret < 0) {
             goto cleanup;
+        assert(ret);
         assert(ret <= size);
         size -= ret;
     ret = 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.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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