Skip to content

Commit 3bdb1a7

Browse files
avihai1122legoater
authored andcommitted
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 <[email protected]> Reviewed-by: Cédric Le Goater <[email protected]> Acked-by: Peter Xu <[email protected]> Tested-by: Joao Martins <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Cédric Le Goater <[email protected]>
1 parent 844ed0f commit 3bdb1a7

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

include/migration/misc.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ void dump_vmstate_json_to_file(FILE *out_fp);
5353
void migration_object_init(void);
5454
void migration_shutdown(void);
5555

56-
bool migration_is_active(void);
5756
bool migration_is_running(void);
5857
bool migration_thread_is_self(void);
5958

migration/migration.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1139,6 +1139,14 @@ bool migration_is_running(void)
11391139
}
11401140
}
11411141

1142+
static bool migration_is_active(void)
1143+
{
1144+
MigrationState *s = current_migration;
1145+
1146+
return (s->state == MIGRATION_STATUS_ACTIVE ||
1147+
s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);
1148+
}
1149+
11421150
static bool migrate_show_downtime(MigrationState *s)
11431151
{
11441152
return (s->state == MIGRATION_STATUS_COMPLETED) || migration_in_postcopy();
@@ -1637,14 +1645,6 @@ bool migration_in_bg_snapshot(void)
16371645
return migrate_background_snapshot() && migration_is_running();
16381646
}
16391647

1640-
bool migration_is_active(void)
1641-
{
1642-
MigrationState *s = current_migration;
1643-
1644-
return (s->state == MIGRATION_STATUS_ACTIVE ||
1645-
s->state == MIGRATION_STATUS_POSTCOPY_ACTIVE);
1646-
}
1647-
16481648
bool migration_thread_is_self(void)
16491649
{
16501650
MigrationState *s = current_migration;

0 commit comments

Comments
 (0)