[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 8/8] ram: Remove useless colo special-casing
From: |
Lukas Straub |
Subject: |
[PATCH 8/8] ram: Remove useless colo special-casing |
Date: |
Thu, 22 Jun 2023 14:16:44 +0200 |
This is not needed, as colo primary side everything is more or less
a new migration for every checkpoint.
Also, we only enter colo mode after the precopy migration is finished
so this if is always taken. Still add an assert just in case.
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
---
migration/ram.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index e3eadd08cd..e5c1146360 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -2994,17 +2994,17 @@ static int ram_save_setup(QEMUFile *f, void *opaque)
RAMBlock *block;
int ret;
+ assert(!migration_in_colo_state());
+
if (compress_threads_save_setup()) {
return -1;
}
- /* migration has already setup the bitmap, reuse it. */
- if (!migration_in_colo_state()) {
- if (ram_init_all(rsp) != 0) {
- compress_threads_save_cleanup();
- return -1;
- }
+ if (ram_init_all(rsp) != 0) {
+ compress_threads_save_cleanup();
+ return -1;
}
+
(*rsp)->pss[RAM_CHANNEL_PRECOPY].pss_channel = f;
WITH_RCU_READ_LOCK_GUARD() {
--
2.39.2
pgpqEakdPx8Y7.pgp
Description: OpenPGP digital signature
- [PATCH 1/8] colo: Only support the same qemu version on source and destination, (continued)
- [PATCH 1/8] colo: Only support the same qemu version on source and destination, Lukas Straub, 2023/06/22
- [PATCH 2/8] colo: Setup ram cache in normal migration path, Lukas Straub, 2023/06/22
- [PATCH 3/8] colo: Replace migration_incoming_colo_enabled() with migrate_colo(), Lukas Straub, 2023/06/22
- [PATCH 5/8] colo: Don't send ENABLE_COLO command, Lukas Straub, 2023/06/22
- [PATCH 6/8] colo: Reject colo with postcopy capability enabled, Lukas Straub, 2023/06/22
- [PATCH 4/8] colo: Remove ENABLE_COLO loadvm command functions, Lukas Straub, 2023/06/22
- [PATCH 7/8] colo: Reject colo with block migration capability enabled, Lukas Straub, 2023/06/22
- [PATCH 8/8] ram: Remove useless colo special-casing,
Lukas Straub <=