diff options
| author | Avihai Horon <avihaih@nvidia.com> | 2024-12-18 15:40:22 +0200 |
|---|---|---|
| committer | Cédric Le Goater <clg@redhat.com> | 2024-12-26 07:23:38 +0100 |
| commit | 3bdb1a75f1bb4234904dec7753de9c0c0ece3dbf (patch) | |
| tree | f8be4b00d7775dc5f2ae01fc049ddc53e8c316a8 /migration/migration.c | |
| parent | 844ed0f7622679d86c2244a2101d2a166c5313e0 (diff) | |
| download | focaccia-qemu-3bdb1a75f1bb4234904dec7753de9c0c0ece3dbf.tar.gz focaccia-qemu-3bdb1a75f1bb4234904dec7753de9c0c0ece3dbf.zip | |
migration: Unexport migration_is_active()
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: https://lore.kernel.org/r/20241218134022.21264-8-avihaih@nvidia.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'migration/migration.c')
| -rw-r--r-- | migration/migration.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/migration/migration.c b/migration/migration.c index 3606d1e263..df61ca4e93 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; |