[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/30] migration: move migration_global_dump() to migration-hmp-cm
From: |
Juan Quintela |
Subject: |
[PULL 02/30] migration: move migration_global_dump() to migration-hmp-cmds.c |
Date: |
Mon, 24 Apr 2023 15:27:02 +0200 |
It is only used there, so we can make it static.
Once there, remove spice.h that it is not used.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
fix David Edmonson ui/qemu-spice.h unintended removal
---
include/migration/misc.h | 1 -
migration/migration-hmp-cmds.c | 22 +++++++++++++++++++++-
migration/migration.c | 19 -------------------
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/include/migration/misc.h b/include/migration/misc.h
index 8b49841016..5ebe13b4b9 100644
--- a/include/migration/misc.h
+++ b/include/migration/misc.h
@@ -66,7 +66,6 @@ bool migration_has_finished(MigrationState *);
bool migration_has_failed(MigrationState *);
/* ...and after the device transmission */
bool migration_in_postcopy_after_devices(MigrationState *);
-void migration_global_dump(Monitor *mon);
/* True if incoming migration entered POSTCOPY_INCOMING_DISCARD */
bool migration_in_incoming_postcopy(void);
/* True if incoming migration entered POSTCOPY_INCOMING_ADVISE */
diff --git a/migration/migration-hmp-cmds.c b/migration/migration-hmp-cmds.c
index 72519ea99f..71da91967a 100644
--- a/migration/migration-hmp-cmds.c
+++ b/migration/migration-hmp-cmds.c
@@ -15,7 +15,6 @@
#include "qemu/osdep.h"
#include "block/qapi.h"
-#include "migration/misc.h"
#include "migration/snapshot.h"
#include "monitor/hmp.h"
#include "monitor/monitor.h"
@@ -30,6 +29,27 @@
#include "qemu/sockets.h"
#include "sysemu/runstate.h"
#include "ui/qemu-spice.h"
+#include "sysemu/sysemu.h"
+#include "migration.h"
+
+static void migration_global_dump(Monitor *mon)
+{
+ MigrationState *ms = migrate_get_current();
+
+ monitor_printf(mon, "globals:\n");
+ monitor_printf(mon, "store-global-state: %s\n",
+ ms->store_global_state ? "on" : "off");
+ monitor_printf(mon, "only-migratable: %s\n",
+ only_migratable ? "on" : "off");
+ monitor_printf(mon, "send-configuration: %s\n",
+ ms->send_configuration ? "on" : "off");
+ monitor_printf(mon, "send-section-footer: %s\n",
+ ms->send_section_footer ? "on" : "off");
+ monitor_printf(mon, "decompress-error-check: %s\n",
+ ms->decompress_error_check ? "on" : "off");
+ monitor_printf(mon, "clear-bitmap-shift: %u\n",
+ ms->clear_bitmap_shift);
+}
void hmp_info_migrate(Monitor *mon, const QDict *qdict)
{
diff --git a/migration/migration.c b/migration/migration.c
index 9ec6c1e204..a867631ab0 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -4416,25 +4416,6 @@ void migrate_fd_connect(MigrationState *s, Error
*error_in)
s->migration_thread_running = true;
}
-void migration_global_dump(Monitor *mon)
-{
- MigrationState *ms = migrate_get_current();
-
- monitor_printf(mon, "globals:\n");
- monitor_printf(mon, "store-global-state: %s\n",
- ms->store_global_state ? "on" : "off");
- monitor_printf(mon, "only-migratable: %s\n",
- only_migratable ? "on" : "off");
- monitor_printf(mon, "send-configuration: %s\n",
- ms->send_configuration ? "on" : "off");
- monitor_printf(mon, "send-section-footer: %s\n",
- ms->send_section_footer ? "on" : "off");
- monitor_printf(mon, "decompress-error-check: %s\n",
- ms->decompress_error_check ? "on" : "off");
- monitor_printf(mon, "clear-bitmap-shift: %u\n",
- ms->clear_bitmap_shift);
-}
-
#define DEFINE_PROP_MIG_CAP(name, x) \
DEFINE_PROP_BOOL(name, MigrationState, capabilities[x], false)
--
2.39.2
- [PULL 00/30] Migration 20230424 patches, Juan Quintela, 2023/04/24
- [PULL 04/30] migration: Create migrate_cap_set(), Juan Quintela, 2023/04/24
- [PULL 01/30] migration: Minor control flow simplification, Juan Quintela, 2023/04/24
- [PULL 05/30] migration: Create options.c, Juan Quintela, 2023/04/24
- [PULL 09/30] migration: Move migrate_use_multifd() to options.c, Juan Quintela, 2023/04/24
- [PULL 02/30] migration: move migration_global_dump() to migration-hmp-cmds.c,
Juan Quintela <=
- [PULL 03/30] spice: move client_migrate_info command to ui/, Juan Quintela, 2023/04/24
- [PULL 10/30] migration: Move migrate_use_zero_copy_send() to options.c, Juan Quintela, 2023/04/24
- [PULL 12/30] migration: Move migrate_use_block() to options.c, Juan Quintela, 2023/04/24
- [PULL 06/30] migration: Move migrate_colo_enabled() to options.c, Juan Quintela, 2023/04/24
- [PULL 07/30] migration: Move migrate_use_compression() to options.c, Juan Quintela, 2023/04/24
- [PULL 13/30] migration: Move migrate_use_return() to options.c, Juan Quintela, 2023/04/24
- [PULL 11/30] migration: Move migrate_use_xbzrle() to options.c, Juan Quintela, 2023/04/24
- [PULL 14/30] migration: Create migrate_rdma_pin_all() function, Juan Quintela, 2023/04/24
- [PULL 17/30] migration: Move qmp_migrate_set_capabilities() to options.c, Juan Quintela, 2023/04/24
- [PULL 20/30] migration: Use migrate_max_postcopy_bandwidth(), Juan Quintela, 2023/04/24