qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 24/43] migration: Move migrate_announce_params() to option.c


From: Juan Quintela
Subject: [PATCH 24/43] migration: Move migrate_announce_params() to option.c
Date: Thu, 2 Mar 2023 17:33:51 +0100

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration/migration.c | 14 --------------
 migration/options.c   | 19 +++++++++++++++++++
 2 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/migration/migration.c b/migration/migration.c
index 62478ac8c1..176ddb51f1 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -954,20 +954,6 @@ MigrationParameters *qmp_query_migrate_parameters(Error 
**errp)
     return params;
 }
 
-AnnounceParameters *migrate_announce_params(void)
-{
-    static AnnounceParameters ap;
-
-    MigrationState *s = migrate_get_current();
-
-    ap.initial = s->parameters.announce_initial;
-    ap.max = s->parameters.announce_max;
-    ap.rounds = s->parameters.announce_rounds;
-    ap.step = s->parameters.announce_step;
-
-    return &ap;
-}
-
 /*
  * Return true if we're already in the middle of a migration
  * (i.e. any of the active or setup states)
diff --git a/migration/options.c b/migration/options.c
index 472982f91e..afb7794cec 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -18,6 +18,7 @@
 #include "qapi/qapi-commands-migration.h"
 #include "qapi/qmp/qerror.h"
 #include "sysemu/runstate.h"
+#include "migration/misc.h"
 #include "migration.h"
 #include "ram.h"
 #include "options.h"
@@ -591,3 +592,21 @@ uint64_t migrate_xbzrle_cache_size(void)
 
     return s->parameters.xbzrle_cache_size;
 }
+
+/* parameters helpers */
+
+AnnounceParameters *migrate_announce_params(void)
+{
+    static AnnounceParameters ap;
+
+    MigrationState *s = migrate_get_current();
+
+    ap.initial = s->parameters.announce_initial;
+    ap.max = s->parameters.announce_max;
+    ap.rounds = s->parameters.announce_rounds;
+    ap.step = s->parameters.announce_step;
+
+    return &ap;
+}
+
+
-- 
2.39.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]