diff options
author | Juan Quintela <quintela@redhat.com> | 2017-07-17 12:30:25 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2017-09-22 14:11:23 +0200 |
commit | e595a01ab656192b11254b3dafcc83b0adb18470 (patch) | |
tree | bf3da01875b5b19b2a92ffd61a0a7bc289156340 /migration | |
parent | f986c3d2569c6aa5cd03a6b8bbb5371e4b608d3c (diff) | |
download | qemu-e595a01ab656192b11254b3dafcc83b0adb18470.zip |
migration: Split migration_fd_process_incoming
We need that on later patches.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/migration.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/migration/migration.c b/migration/migration.c index 336da038f5..067dd929c4 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(); |