aboutsummaryrefslogtreecommitdiff
path: root/migration/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-03-01 22:20:13 +0100
committerJuan Quintela <quintela@redhat.com>2023-04-24 15:01:46 +0200
commit87dca0c9bb63014ef73ad82f7aedea1cb5a822e7 (patch)
tree28046c849afa74dd7fc5e697cd5c37c5464066fe /migration/migration.c
parentb4bc342c766640e0cb8a0b72f71e0ee5545fb790 (diff)
downloadqemu-87dca0c9bb63014ef73ad82f7aedea1cb5a822e7.zip
qemu-87dca0c9bb63014ef73ad82f7aedea1cb5a822e7.tar.gz
qemu-87dca0c9bb63014ef73ad82f7aedea1cb5a822e7.tar.bz2
migration: Move migrate_use_xbzrle() to options.c
Once that we are there, we rename the function to migrate_xbzrle() to be consistent with all other capabilities. We change the type to return bool also for consistency. 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 fbb6181..abb820c 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1122,7 +1122,7 @@ static void populate_ram_info(MigrationInfo *info, MigrationState *s)
info->ram->downtime_bytes = stat64_get(&ram_counters.downtime_bytes);
info->ram->postcopy_bytes = stat64_get(&ram_counters.postcopy_bytes);
- if (migrate_use_xbzrle()) {
+ if (migrate_xbzrle()) {
info->xbzrle_cache = g_malloc0(sizeof(*info->xbzrle_cache));
info->xbzrle_cache->cache_size = migrate_xbzrle_cache_size();
info->xbzrle_cache->bytes = xbzrle_counters.bytes;
@@ -2604,15 +2604,6 @@ int migrate_use_tls(void)
return s->parameters.tls_creds && *s->parameters.tls_creds;
}
-int migrate_use_xbzrle(void)
-{
- MigrationState *s;
-
- s = migrate_get_current();
-
- return s->capabilities[MIGRATION_CAPABILITY_XBZRLE];
-}
-
uint64_t migrate_xbzrle_cache_size(void)
{
MigrationState *s;