@@ -49,7 +49,7 @@ void colo_checkpoint_delay_set(void);
*
* Called with BQL locked, may temporary release BQL.
*/
-int coroutine_fn colo_incoming_co(void);
+void coroutine_fn colo_incoming_co(void);
void colo_shutdown(void);
#endif
@@ -9,9 +9,8 @@ void colo_shutdown(void)
{
}
-int coroutine_fn colo_incoming_co(void)
+void coroutine_fn colo_incoming_co(void)
{
- return 0;
}
void colo_checkpoint_delay_set(void)
@@ -929,16 +929,13 @@ out:
return NULL;
}
-int coroutine_fn colo_incoming_co(void)
+void coroutine_fn colo_incoming_co(void)
{
MigrationIncomingState *mis = migration_incoming_get_current();
QemuThread th;
assert(bql_locked());
-
- if (!migration_incoming_colo_enabled()) {
- return 0;
- }
+ assert(migration_incoming_colo_enabled());
qemu_thread_create(&th, "COLO incoming", colo_process_incoming_thread,
mis, QEMU_THREAD_JOINABLE);
@@ -954,6 +951,4 @@ int coroutine_fn colo_incoming_co(void)
/* We hold the global BQL, so it is safe here */
colo_release_ram_cache();
-
- return 0;
}
@@ -789,9 +789,9 @@ process_incoming_migration_co(void *opaque)
goto fail;
}
- if (colo_incoming_co() < 0) {
- error_setg(&local_err, "colo incoming failed");
- goto fail;
+ if (migration_incoming_colo_enabled()) {
+ /* yield until COLO exit */
+ colo_incoming_co();
}
migration_bh_schedule(process_incoming_migration_bh, mis);