]> git.ipfire.org Git - thirdparty/libvirt.git/commit
In virFDStreamRead(), fill buffer from this and next messages
authorErik Huelsmann <ehuels@gmail.com>
Wed, 11 Feb 2026 17:36:06 +0000 (18:36 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 12 Feb 2026 18:06:47 +0000 (18:06 +0000)
commite23fd0b7fd36c41e6db49df4f4962762d3ef6ab0
tree6fcebac77c29e936476af82016f5a349cf6d2c1a
parentcaf74fab507c7f0a8c6df13f3fc605d8b985a8aa
In virFDStreamRead(), fill buffer from this and next messages

Before this change, buffers returned from virFDStreamRead() would
alternate in size (262120 and 24), because it only consumed the
bytes remaining from the current background thread message.

As the background thread reads 262144 bytes (256kB) of data in
each chunk, where the maximum size returned from virFDStreamRead()
to be transferred over the remote protocol is only 262120, 24 bytes
would be left in the buffer on each iteration. The next iteration
leaves 24 bytes, which used to be returned without considering
messages waiting in the queue.

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Erik Huelsmann <ehuels@gmail.com>
src/util/virfdstream.c