From e595a01ab656192b11254b3dafcc83b0adb18470 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Mon, 17 Jul 2017 12:30:25 +0200 Subject: migration: Split migration_fd_process_incoming We need that on later patches. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Daniel P. Berrange --- migration/migration.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 336da03..067dd92 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -372,9 +372,8 @@ static void process_incoming_migration_co(void *opaque) qemu_bh_schedule(mis->bh); } -void migration_fd_process_incoming(QEMUFile *f) +static void migration_incoming_setup(QEMUFile *f) { - Coroutine *co = qemu_coroutine_create(process_incoming_migration_co, NULL); MigrationIncomingState *mis = migration_incoming_get_current(); if (multifd_load_setup() != 0) { @@ -387,9 +386,20 @@ void migration_fd_process_incoming(QEMUFile *f) mis->from_src_file = f; } qemu_file_set_blocking(f, false); +} + +static void migration_incoming_process(void) +{ + Coroutine *co = qemu_coroutine_create(process_incoming_migration_co, NULL); qemu_coroutine_enter(co); } +void migration_fd_process_incoming(QEMUFile *f) +{ + migration_incoming_setup(f); + migration_incoming_process(); +} + void migration_ioc_process_incoming(QIOChannel *ioc) { MigrationIncomingState *mis = migration_incoming_get_current(); -- cgit v1.1