aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorElena Ufimtseva <elena.ufimtseva@oracle.com>2023-10-11 11:43:58 -0700
committerJuan Quintela <quintela@redhat.com>2023-10-17 09:25:13 +0200
commit1618f5522145b3cab4d9eb154b921417b577dc2c (patch)
tree88993c86468817575e92355757579e37eb861f4e /migration
parent68b6e000484c6df34d5cd097e5ae94e9612f5df7 (diff)
downloadqemu-1618f5522145b3cab4d9eb154b921417b577dc2c.zip
qemu-1618f5522145b3cab4d9eb154b921417b577dc2c.tar.gz
qemu-1618f5522145b3cab4d9eb154b921417b577dc2c.tar.bz2
multifd: reset next_packet_len after sending pages
Sometimes multifd sends just sync packet with no pages (normal_num is 0). In this case the old value is being preserved and being accounted for while only packet_len is being transferred. Reset it to 0 after sending and accounting for. Signed-off-by: Elena Ufimtseva <elena.ufimtseva@oracle.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231011184358.97349-5-elena.ufimtseva@oracle.com>
Diffstat (limited to 'migration')
-rw-r--r--migration/multifd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/migration/multifd.c b/migration/multifd.c
index e6e0013..c45f501 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -730,6 +730,7 @@ static void *multifd_send_thread(void *opaque)
p->next_packet_size + p->packet_len);
stat64_add(&mig_stats.transferred,
p->next_packet_size + p->packet_len);
+ p->next_packet_size = 0;
qemu_mutex_lock(&p->mutex);
p->pending_job--;
qemu_mutex_unlock(&p->mutex);