diff options
author | Juan Quintela <quintela@redhat.com> | 2023-03-02 00:39:03 +0100 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-04-24 15:01:46 +0200 |
commit | 1dfc4b9e19bcf1ad41a1be9ac82db35b9647c3c1 (patch) | |
tree | ea58653bdc2eeb278db1365cc1b3443c321196fd /migration/options.c | |
parent | f80196b772ddeeb07d3d80d5c8382cb5d1063fa2 (diff) |
migration: Move parameters functions to option.c
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Diffstat (limited to 'migration/options.c')
-rw-r--r-- | migration/options.c | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/migration/options.c b/migration/options.c index f3b2d6e482..8d15be858c 100644 --- a/migration/options.c +++ b/migration/options.c @@ -460,3 +460,96 @@ void qmp_migrate_set_capabilities(MigrationCapabilityStatusList *params, s->capabilities[cap->value->capability] = cap->value->state; } } + +/* parameters */ + +int migrate_compress_level(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->parameters.compress_level; +} + +int migrate_compress_threads(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->parameters.compress_threads; +} + +int migrate_compress_wait_thread(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->parameters.compress_wait_thread; +} + +int migrate_decompress_threads(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->parameters.decompress_threads; +} + +int64_t migrate_max_postcopy_bandwidth(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->parameters.max_postcopy_bandwidth; +} + +int migrate_multifd_channels(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->parameters.multifd_channels; +} + +MultiFDCompression migrate_multifd_compression(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + assert(s->parameters.multifd_compression < MULTIFD_COMPRESSION__MAX); + return s->parameters.multifd_compression; +} + +int migrate_multifd_zlib_level(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->parameters.multifd_zlib_level; +} + +int migrate_multifd_zstd_level(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->parameters.multifd_zstd_level; +} + +uint64_t migrate_xbzrle_cache_size(void) +{ + MigrationState *s; + + s = migrate_get_current(); + + return s->parameters.xbzrle_cache_size; +} |