migration: Add interface to control compression

The multiple compression threads can be turned on/off through
qmp and hmp interface before doing live migration.

Signed-off-by: Liang Li <liang.z.li@intel.com>
Signed-off-by: Yang Zhang <yang.z.zhang@intel.com>
Reviewed-by: Dr.David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
Liang Li 2015-03-23 16:32:26 +08:00 committed by Juan Quintela
parent 68ae113646
commit dde4e694ae
2 changed files with 15 additions and 3 deletions

View file

@ -611,8 +611,11 @@ bool migrate_zero_blocks(void)
bool migrate_use_compression(void)
{
/* Disable compression before the patch series are applied */
return false;
MigrationState *s;
s = migrate_get_current();
return s->enabled_capabilities[MIGRATION_CAPABILITY_COMPRESS];
}
int migrate_compress_level(void)