mirror of https://github.com/xemu-project/xemu.git
migration: Move migrate_use_block() to options.c
Once that we are there, we rename the function to migrate_block() to be consistent with all other capabilities. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
This commit is contained in:
parent
87dca0c9bb
commit
9d4b1e5f22
|
@ -1001,7 +1001,7 @@ static int block_load(QEMUFile *f, void *opaque, int version_id)
|
|||
|
||||
static bool block_is_active(void *opaque)
|
||||
{
|
||||
return migrate_use_block();
|
||||
return migrate_block();
|
||||
}
|
||||
|
||||
static SaveVMHandlers savevm_block_handlers = {
|
||||
|
|
|
@ -2415,7 +2415,7 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc,
|
|||
error_setg(errp, "No disk migration is required in COLO mode");
|
||||
return false;
|
||||
}
|
||||
if (migrate_use_block() || migrate_use_block_incremental()) {
|
||||
if (migrate_block() || migrate_use_block_incremental()) {
|
||||
error_setg(errp, "Command options are incompatible with "
|
||||
"current migration capabilities");
|
||||
return false;
|
||||
|
@ -2622,15 +2622,6 @@ static int64_t migrate_max_postcopy_bandwidth(void)
|
|||
return s->parameters.max_postcopy_bandwidth;
|
||||
}
|
||||
|
||||
bool migrate_use_block(void)
|
||||
{
|
||||
MigrationState *s;
|
||||
|
||||
s = migrate_get_current();
|
||||
|
||||
return s->capabilities[MIGRATION_CAPABILITY_BLOCK];
|
||||
}
|
||||
|
||||
bool migrate_use_return_path(void)
|
||||
{
|
||||
MigrationState *s;
|
||||
|
|
|
@ -457,7 +457,6 @@ int migrate_multifd_zstd_level(void);
|
|||
int migrate_use_tls(void);
|
||||
uint64_t migrate_xbzrle_cache_size(void);
|
||||
|
||||
bool migrate_use_block(void);
|
||||
bool migrate_use_block_incremental(void);
|
||||
int migrate_max_cpu_throttle(void);
|
||||
bool migrate_use_return_path(void);
|
||||
|
|
|
@ -33,6 +33,15 @@ bool migrate_background_snapshot(void)
|
|||
return s->capabilities[MIGRATION_CAPABILITY_BACKGROUND_SNAPSHOT];
|
||||
}
|
||||
|
||||
bool migrate_block(void)
|
||||
{
|
||||
MigrationState *s;
|
||||
|
||||
s = migrate_get_current();
|
||||
|
||||
return s->capabilities[MIGRATION_CAPABILITY_BLOCK];
|
||||
}
|
||||
|
||||
bool migrate_colo(void)
|
||||
{
|
||||
MigrationState *s = migrate_get_current();
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
bool migrate_auto_converge(void);
|
||||
bool migrate_background_snapshot(void);
|
||||
bool migrate_block(void);
|
||||
bool migrate_colo(void);
|
||||
bool migrate_compress(void);
|
||||
bool migrate_dirty_bitmaps(void);
|
||||
|
|
|
@ -1612,7 +1612,7 @@ static int qemu_savevm_state(QEMUFile *f, Error **errp)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (migrate_use_block()) {
|
||||
if (migrate_block()) {
|
||||
error_setg(errp, "Block migration and snapshots are incompatible");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue