migration: Be sure all recv channels are created
We need them before we start migration. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
667707078d
commit
62c1e0ca73
@ -462,7 +462,11 @@ void migration_ioc_process_incoming(QIOChannel *ioc)
|
|||||||
*/
|
*/
|
||||||
bool migration_has_all_channels(void)
|
bool migration_has_all_channels(void)
|
||||||
{
|
{
|
||||||
return true;
|
bool all_channels;
|
||||||
|
|
||||||
|
all_channels = multifd_recv_all_channels_created();
|
||||||
|
|
||||||
|
return all_channels;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -671,6 +671,17 @@ int multifd_load_setup(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool multifd_recv_all_channels_created(void)
|
||||||
|
{
|
||||||
|
int thread_count = migrate_multifd_channels();
|
||||||
|
|
||||||
|
if (!migrate_use_multifd()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return thread_count == atomic_read(&multifd_recv_state->count);
|
||||||
|
}
|
||||||
|
|
||||||
void multifd_recv_new_channel(QIOChannel *ioc)
|
void multifd_recv_new_channel(QIOChannel *ioc)
|
||||||
{
|
{
|
||||||
/* nothing to do yet */
|
/* nothing to do yet */
|
||||||
|
@ -45,6 +45,7 @@ int multifd_save_setup(void);
|
|||||||
int multifd_save_cleanup(Error **errp);
|
int multifd_save_cleanup(Error **errp);
|
||||||
int multifd_load_setup(void);
|
int multifd_load_setup(void);
|
||||||
int multifd_load_cleanup(Error **errp);
|
int multifd_load_cleanup(Error **errp);
|
||||||
|
bool multifd_recv_all_channels_created(void);
|
||||||
void multifd_recv_new_channel(QIOChannel *ioc);
|
void multifd_recv_new_channel(QIOChannel *ioc);
|
||||||
|
|
||||||
uint64_t ram_pagesize_summary(void);
|
uint64_t ram_pagesize_summary(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user