migration: Add multifd capability

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>

--

Use new DEFINE_PROP
This commit is contained in:
Juan Quintela 2016-01-14 12:23:00 +01:00
parent 428d89084c
commit 30126bbf1f
3 changed files with 14 additions and 1 deletions

View File

@ -1449,6 +1449,15 @@ bool migrate_use_events(void)
return s->enabled_capabilities[MIGRATION_CAPABILITY_EVENTS];
}
bool migrate_use_multifd(void)
{
MigrationState *s;
s = migrate_get_current();
return s->enabled_capabilities[MIGRATION_CAPABILITY_X_MULTIFD];
}
int migrate_use_xbzrle(void)
{
MigrationState *s;
@ -2227,6 +2236,7 @@ static Property migration_properties[] = {
DEFINE_PROP_MIG_CAP("x-release-ram", MIGRATION_CAPABILITY_RELEASE_RAM),
DEFINE_PROP_MIG_CAP("x-block", MIGRATION_CAPABILITY_BLOCK),
DEFINE_PROP_MIG_CAP("x-return-path", MIGRATION_CAPABILITY_RETURN_PATH),
DEFINE_PROP_MIG_CAP("x-multifd", MIGRATION_CAPABILITY_X_MULTIFD),
DEFINE_PROP_END_OF_LIST(),
};

View File

@ -174,6 +174,7 @@ bool migrate_postcopy_ram(void);
bool migrate_zero_blocks(void);
bool migrate_auto_converge(void);
bool migrate_use_multifd(void);
int migrate_use_xbzrle(void);
int64_t migrate_xbzrle_cache_size(void);

View File

@ -341,12 +341,14 @@
# @return-path: If enabled, migration will use the return path even
# for precopy. (since 2.10)
#
# @x-multifd: Use more than one fd for migration (since 2.11)
#
# Since: 1.2
##
{ 'enum': 'MigrationCapability',
'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
'block', 'return-path' ] }
'block', 'return-path', 'x-multifd' ] }
##
# @MigrationCapabilityStatus: