summaryrefslogtreecommitdiff
path: root/migration/ram.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2018-02-19 18:59:02 +0100
committerJuan Quintela <quintela@redhat.com>2018-05-15 20:24:27 +0200
commit62c1e0ca739008aaec6d3a18456f479bed61713b (patch)
tree0c146a0fa783a26db1586d74b46f87c3a7079007 /migration/ram.c
parent667707078d8d365d449d1908805c09506f67825f (diff)
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>
Diffstat (limited to 'migration/ram.c')
-rw-r--r--migration/ram.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/migration/ram.c b/migration/ram.c
index 1aa661e6ab..d5335c10b6 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -671,6 +671,17 @@ int multifd_load_setup(void)
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)
{
/* nothing to do yet */