]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration/multifd: pages->used would be cleared when attach to multifd_send_state
authorWei Yang <richardw.yang@linux.intel.com>
Fri, 11 Oct 2019 08:50:50 +0000 (16:50 +0800)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Fri, 11 Oct 2019 14:02:06 +0000 (15:02 +0100)
When we found an available channel in multifd_send_pages(), its
pages->used is cleared and then attached to multifd_send_state.

It is not necessary to do this twice.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20191011085050.17622-5-richardw.yang@linux.intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/ram.c

index 963e795ed0a1da6c52f65342f53a88c51122789a..5078f94490de7a1bc71670376078f44e69affb84 100644 (file)
@@ -1129,7 +1129,6 @@ static void *multifd_send_thread(void *opaque)
             p->flags = 0;
             p->num_packets++;
             p->num_pages += used;
-            p->pages->used = 0;
             qemu_mutex_unlock(&p->mutex);
 
             trace_multifd_send(p->id, packet_num, used, flags,