* [PATCH] migration: move migration_global_dump() to migration-hmp-cmds.c
@ 2023-03-02 16:26 Juan Quintela
2023-03-06 11:45 ` David Edmondson
0 siblings, 1 reply; 3+ messages in thread
From: Juan Quintela @ 2023-03-02 16:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Dr. David Alan Gilbert, Juan Quintela
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>
---
include/migration/misc.h | 1 -
migration/migration-hmp-cmds.c | 23 +++++++++++++++++++++--
migration/migration.c | 19 -------------------
3 files changed, 21 insertions(+), 22 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..7dcb289c05 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"
@@ -29,7 +28,27 @@
#include "qemu/error-report.h"
#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 ca52c8aab3..c0584481c7 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -4410,25 +4410,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, enabled_capabilities[x], false)
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] migration: move migration_global_dump() to migration-hmp-cmds.c
2023-03-02 16:26 [PATCH] migration: move migration_global_dump() to migration-hmp-cmds.c Juan Quintela
@ 2023-03-06 11:45 ` David Edmondson
2023-04-20 12:05 ` Juan Quintela
0 siblings, 1 reply; 3+ messages in thread
From: David Edmondson @ 2023-03-06 11:45 UTC (permalink / raw)
To: Juan Quintela, qemu-devel; +Cc: Dr. David Alan Gilbert, Juan Quintela
Juan Quintela <quintela@redhat.com> writes:
> It is only used there, so we can make it static.
> Once there, remove spice.h that it is not used.
The removal of ui/qemu-spice.h seems like an unrelated change - should
be a different changeset?
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> include/migration/misc.h | 1 -
> migration/migration-hmp-cmds.c | 23 +++++++++++++++++++++--
> migration/migration.c | 19 -------------------
> 3 files changed, 21 insertions(+), 22 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..7dcb289c05 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"
> @@ -29,7 +28,27 @@
> #include "qemu/error-report.h"
> #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 ca52c8aab3..c0584481c7 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -4410,25 +4410,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, enabled_capabilities[x], false)
>
> --
> 2.39.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] migration: move migration_global_dump() to migration-hmp-cmds.c
2023-03-06 11:45 ` David Edmondson
@ 2023-04-20 12:05 ` Juan Quintela
0 siblings, 0 replies; 3+ messages in thread
From: Juan Quintela @ 2023-04-20 12:05 UTC (permalink / raw)
To: David Edmondson; +Cc: qemu-devel, Dr. David Alan Gilbert
David Edmondson <david.edmondson@oracle.com> wrote:
> Juan Quintela <quintela@redhat.com> writes:
>
>> It is only used there, so we can make it static.
>> Once there, remove spice.h that it is not used.
>
> The removal of ui/qemu-spice.h seems like an unrelated change - should
> be a different changeset?
You are right.
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-04-20 12:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-02 16:26 [PATCH] migration: move migration_global_dump() to migration-hmp-cmds.c Juan Quintela
2023-03-06 11:45 ` David Edmondson
2023-04-20 12:05 ` Juan Quintela
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.