[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/10] migration: process_incoming_migration_co: simplify code flo
From: |
Juan Quintela |
Subject: |
[PULL 08/10] migration: process_incoming_migration_co: simplify code flow around ret |
Date: |
Wed, 10 May 2023 20:09:36 +0200 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Zhang Chen <chen.zhang@intel.com>
Message-Id: <20230428194928.1426370-7-vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/migration.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index c7f628caa6..140b2a4de6 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -542,8 +542,13 @@ process_incoming_migration_co(void *opaque)
/* Else if something went wrong then just fall out of the normal exit
*/
}
+ if (ret < 0) {
+ error_report("load of migration failed: %s", strerror(-ret));
+ goto fail;
+ }
+
/* we get COLO info, and know if we are in COLO mode */
- if (!ret && migration_incoming_colo_enabled()) {
+ if (migration_incoming_colo_enabled()) {
QemuThread colo_incoming_thread;
/* Make sure all file formats throw away their mutable metadata */
@@ -565,10 +570,6 @@ process_incoming_migration_co(void *opaque)
colo_release_ram_cache();
}
- if (ret < 0) {
- error_report("load of migration failed: %s", strerror(-ret));
- goto fail;
- }
mis->bh = qemu_bh_new(process_incoming_migration_bh, mis);
qemu_bh_schedule(mis->bh);
mis->migration_incoming_co = NULL;
--
2.40.1
- Re: [PULL 00/10] Migration 20230509 patches, (continued)
[PULL 00/10] Migration 20230509 patches, Juan Quintela, 2023/05/10
- [PULL 02/10] ram: Let colo_flush_ram_cache take the bitmap_mutex, Juan Quintela, 2023/05/10
- [PULL 01/10] ram: Add public helper to set colo bitmap, Juan Quintela, 2023/05/10
- [PULL 03/10] multifd: Add the ramblock to MultiFDRecvParams, Juan Quintela, 2023/05/10
- [PULL 05/10] colo: make colo_checkpoint_notify static and provide simpler API, Juan Quintela, 2023/05/10
- [PULL 04/10] block/meson.build: prefer positive condition for replication, Juan Quintela, 2023/05/10
- [PULL 07/10] migration: drop colo_incoming_thread from MigrationIncomingState, Juan Quintela, 2023/05/10
- [PULL 08/10] migration: process_incoming_migration_co: simplify code flow around ret,
Juan Quintela <=
- [PULL 06/10] build: move COLO under CONFIG_REPLICATION, Juan Quintela, 2023/05/10
- [PULL 09/10] migration: disallow change capabilities in COLO state, Juan Quintela, 2023/05/10
- [PULL 10/10] migration: block incoming colo when capability is disabled, Juan Quintela, 2023/05/10
- Re: [PULL 00/10] Migration 20230509 patches, Richard Henderson, 2023/05/11