aboutsummaryrefslogtreecommitdiff
path: root/migration/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-03-01 22:03:48 +0100
committerJuan Quintela <quintela@redhat.com>2023-04-24 15:01:46 +0200
commita7a94d14358dd7b445e20c2f26218ff987747642 (patch)
tree937b14f8c311a5078b92ab86b8ee125b80f525a3 /migration/migration.c
parent5e8046445575dc5879e63c5d07af893d174813d0 (diff)
downloadqemu-a7a94d14358dd7b445e20c2f26218ff987747642.zip
qemu-a7a94d14358dd7b445e20c2f26218ff987747642.tar.gz
qemu-a7a94d14358dd7b445e20c2f26218ff987747642.tar.bz2
migration: Move migrate_use_compression() to options.c
Once that we are there, we rename the function to migrate_compress() to be consistent with all other capabilities. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Diffstat (limited to 'migration/migration.c')
-rw-r--r--migration/migration.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 7dfc31e..2c409fa 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1133,7 +1133,7 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s)
info->xbzrle_cache->overflow = xbzrle_counters.overflow;
}
- if (migrate_use_compression()) {
+ if (migrate_compress()) {
info->compression = g_malloc0(sizeof(*info->compression));
info->compression->pages = compression_counters.pages;
info->compression->busy = compression_counters.busy;
@@ -2522,15 +2522,6 @@ bool migrate_postcopy(void)
return migrate_postcopy_ram() || migrate_dirty_bitmaps();
}
-bool migrate_use_compression(void)
-{
- MigrationState *s;
-
- s = migrate_get_current();
-
- return s->capabilities[MIGRATION_CAPABILITY_COMPRESS];
-}
-
int migrate_compress_level(void)
{
MigrationState *s;