[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/17] migration: Unexport migration_is_active()
From: |
Cédric Le Goater |
Subject: |
[PULL 17/17] migration: Unexport migration_is_active() |
Date: |
Tue, 24 Dec 2024 16:15:47 +0100 |
From: Avihai Horon <avihaih@nvidia.com>
After being removed from VFIO and dirty limit, migration_is_active() no
longer has any users outside the migration subsystem, and in fact, it's
only used in migration.c.
Unexport it and also relocate it so it can be made static.
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Tested-by: Joao Martins <joao.m.martins@oracle.com>
Link: 20241218134022.21264-8-avihaih@nvidia.com">https://lore.kernel.org/r/20241218134022.21264-8-avihaih@nvidia.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
include/migration/misc.h | 1 -
migration/migration.c | 16 ++++++++--------
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/include/migration/misc.h b/include/migration/misc.h
index
ad1e25826aebefd9f21b638a9f4be7dbc50edb95..c0e23fdac9d0c73a9b284b2e231990fb33464c03
100644
--- a/include/migration/misc.h
+++ b/include/migration/misc.h
@@ -53,7 +53,6 @@ void dump_vmstate_json_to_file(FILE *out_fp);
void migration_object_init(void);
void migration_shutdown(void);
-bool migration_is_active(void);
bool migration_is_running(void);
bool migration_thread_is_self(void);
diff --git a/migration/migration.c b/migration/migration.c
index
3606d1e26302e52de22185ba2438df1972dc0430..df61ca4e938457d5586caec08c27587b46631d0d
100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1139,6 +1139,14 @@ bool migration_is_running(void)
}
}
+static bool migration_is_active(void)
+{
+ MigrationState *s = current_migration;
+
+ return (s->state == MIGRATION_STATUS_ACTIVE ||
+ s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);
+}
+
static bool migrate_show_downtime(MigrationState *s)
{
return (s->state == MIGRATION_STATUS_COMPLETED) || migration_in_postcopy();
@@ -1637,14 +1645,6 @@ bool migration_in_bg_snapshot(void)
return migrate_background_snapshot() && migration_is_running();
}
-bool migration_is_active(void)
-{
- MigrationState *s = current_migration;
-
- return (s->state == MIGRATION_STATUS_ACTIVE ||
- s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);
-}
-
bool migration_thread_is_self(void)
{
MigrationState *s = current_migration;
--
2.47.1
- [PULL 08/17] vfio/igd: emulate GGC register in mmio bar0, (continued)
- [PULL 08/17] vfio/igd: emulate GGC register in mmio bar0, Cédric Le Goater, 2024/12/24
- [PULL 10/17] vfio/igd: add x-igd-gms option back to set DSM region size for guest, Cédric Le Goater, 2024/12/24
- [PULL 09/17] vfio/igd: emulate BDSM in mmio bar0 for gen 6-10 devices, Cédric Le Goater, 2024/12/24
- [PULL 12/17] vfio/migration: Refactor vfio_devices_all_dirty_tracking() logic, Cédric Le Goater, 2024/12/24
- [PULL 13/17] vfio/migration: Refactor vfio_devices_all_running_and_mig_active() logic, Cédric Le Goater, 2024/12/24
- [PULL 07/17] vfio/igd: add macro for declaring mirrored registers, Cédric Le Goater, 2024/12/24
- [PULL 11/17] vfio/container: Add dirty tracking started flag, Cédric Le Goater, 2024/12/24
- [PULL 14/17] vfio/migration: Rename vfio_devices_all_dirty_tracking(), Cédric Le Goater, 2024/12/24
- [PULL 16/17] migration: Drop migration_is_device(), Cédric Le Goater, 2024/12/24
- [PULL 15/17] system/dirtylimit: Don't use migration_is_active(), Cédric Le Goater, 2024/12/24
- [PULL 17/17] migration: Unexport migration_is_active(),
Cédric Le Goater <=
- Re: [PULL 00/17] vfio queue, Stefan Hajnoczi, 2024/12/25