]> xenbits.xensource.com Git - libvirt.git/commitdiff
daemon: fix wrong request count for sparse stream
authorVincent Vanlaer <libvirt-e6954efa@volkihar.be>
Mon, 19 Feb 2024 22:24:02 +0000 (23:24 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 26 Feb 2024 09:03:34 +0000 (10:03 +0100)
Similar to when actual data is being written to the stream, it is
necessary to acknowledge handling of the client request when a hole is
encountered. This is done later in daemonStreamHandleWrite by sending a
fake zero-length reply if the status variable is set to
VIR_STREAM_CONTINUE. It seems that setting status from the message
header was missed for holes in the introduction of the sparse stream
feature.

Signed-off-by: Vincent Vanlaer <libvirt-e6954efa@volkihar.be>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/remote/remote_daemon_stream.c

index 1a89ff822c9f4b448303cb24e2068661c5ed7696..453728a66bc4bd42f68813b9315b56cb0b945f38 100644 (file)
@@ -747,6 +747,7 @@ daemonStreamHandleWrite(virNetServerClient *client,
              * Otherwise just carry on with processing stream
              * data. */
             ret = daemonStreamHandleHole(client, stream, msg);
+            status = msg->header.status;
         } else if (msg->header.type == VIR_NET_STREAM) {
             status = msg->header.status;
             switch (status) {