migration: Delay start of migration main routines

We need to make sure that we have started all the multifd threads.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Juan Quintela 2018-03-07 08:40:52 +01:00
parent 60df2d4ae5
commit 36c2f8be2c
4 changed files with 10 additions and 2 deletions

View file

@ -717,6 +717,9 @@ void multifd_recv_new_channel(QIOChannel *ioc)
qemu_thread_create(&p->thread, p->name, multifd_recv_thread, p,
QEMU_THREAD_JOINABLE);
atomic_inc(&multifd_recv_state->count);
if (multifd_recv_state->count == migrate_multifd_channels()) {
migration_incoming_process();
}
}
/**