summary refs log tree commit diff stats
path: root/migration/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-02-08 14:48:02 +0100
committerJuan Quintela <quintela@redhat.com>2023-02-15 20:04:30 +0100
commit24beea4efe6e6b65fd6248ede936cd3278b2bf8a (patch)
tree99a685728d19d3c8f8ff42f2096b20dcf5faf845 /migration/migration.c
parent24f254ed794bbd217fbceb6b5840dd4fa6545383 (diff)
downloadfocaccia-qemu-24beea4efe6e6b65fd6248ede936cd3278b2bf8a.tar.gz
focaccia-qemu-24beea4efe6e6b65fd6248ede936cd3278b2bf8a.zip
migration: Rename res_{postcopy,precopy}_only
Once that res_compatible is removed, they don't make sense anymore.
We remove the _only preffix.  And to make things clearer we rename
them to must_precopy and can_postcopy.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r--migration/migration.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 296f7fe768..ae2025d9d8 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -3863,18 +3863,18 @@ typedef enum {
  */
 static MigIterateState migration_iteration_run(MigrationState *s)
 {
-    uint64_t pend_pre, pend_post;
+    uint64_t must_precopy, can_postcopy;
     bool in_postcopy = s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE;
 
-    qemu_savevm_state_pending_estimate(&pend_pre, &pend_post);
-    uint64_t pending_size = pend_pre + pend_post;
+    qemu_savevm_state_pending_estimate(&must_precopy, &can_postcopy);
+    uint64_t pending_size = must_precopy + can_postcopy;
 
-    trace_migrate_pending_estimate(pending_size, pend_pre, pend_post);
+    trace_migrate_pending_estimate(pending_size, must_precopy, can_postcopy);
 
-    if (pend_pre <= s->threshold_size) {
-        qemu_savevm_state_pending_exact(&pend_pre, &pend_post);
-        pending_size = pend_pre + pend_post;
-        trace_migrate_pending_exact(pending_size, pend_pre, pend_post);
+    if (must_precopy <= s->threshold_size) {
+        qemu_savevm_state_pending_exact(&must_precopy, &can_postcopy);
+        pending_size = must_precopy + can_postcopy;
+        trace_migrate_pending_exact(pending_size, must_precopy, can_postcopy);
     }
 
     if (!pending_size || pending_size < s->threshold_size) {
@@ -3884,7 +3884,7 @@ static MigIterateState migration_iteration_run(MigrationState *s)
     }
 
     /* Still a significant amount to transfer */
-    if (!in_postcopy && pend_pre <= s->threshold_size &&
+    if (!in_postcopy && must_precopy <= s->threshold_size &&
         qatomic_read(&s->start_postcopy)) {
         if (postcopy_start(s)) {
             error_report("%s: postcopy failed to start", __func__);