aboutsummaryrefslogtreecommitdiff
path: root/migration/migration.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-03-01 22:10:29 +0100
committerJuan Quintela <quintela@redhat.com>2023-04-24 15:01:46 +0200
commit51b07548f7c31793adc178c7460c5f4369733c61 (patch)
treea8f6ddb879ade6d3d7b249e65d7372eeda54e29c /migration/migration.c
parentb890902c9c025b87d02e718eec3090fd3525ab18 (diff)
downloadqemu-51b07548f7c31793adc178c7460c5f4369733c61.zip
qemu-51b07548f7c31793adc178c7460c5f4369733c61.tar.gz
qemu-51b07548f7c31793adc178c7460c5f4369733c61.tar.bz2
migration: Move migrate_use_multifd() to options.c
Once that we are there, we rename the function to migrate_multifd() to be consistent with all other capabilities. 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.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 16800a6..77ceacc 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -186,7 +186,7 @@ static void migrate_fd_cancel(MigrationState *s);
static bool migration_needs_multiple_sockets(void)
{
- return migrate_use_multifd() || migrate_postcopy_preempt();
+ return migrate_multifd() || migrate_postcopy_preempt();
}
static bool uri_supports_multi_channels(const char *uri)
@@ -732,7 +732,7 @@ void migration_fd_process_incoming(QEMUFile *f, Error **errp)
static bool migration_should_start_incoming(bool main_channel)
{
/* Multifd doesn't start unless all channels are established */
- if (migrate_use_multifd()) {
+ if (migrate_multifd()) {
return migration_has_all_channels();
}
@@ -759,7 +759,7 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)
uint32_t channel_magic = 0;
int ret = 0;
- if (migrate_use_multifd() && !migrate_postcopy_ram() &&
+ if (migrate_multifd() && !migrate_postcopy_ram() &&
qio_channel_has_feature(ioc, QIO_CHANNEL_FEATURE_READ_MSG_PEEK)) {
/*
* With multiple channels, it is possible that we receive channels
@@ -798,7 +798,7 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp)
} else {
/* Multiple connections */
assert(migration_needs_multiple_sockets());
- if (migrate_use_multifd()) {
+ if (migrate_multifd()) {
multifd_recv_new_channel(ioc, &local_err);
} else {
assert(migrate_postcopy_preempt());
@@ -834,7 +834,7 @@ bool migration_has_all_channels(void)
return false;
}
- if (migrate_use_multifd()) {
+ if (migrate_multifd()) {
return multifd_recv_all_channels_created();
}
@@ -2558,15 +2558,6 @@ int migrate_decompress_threads(void)
return s->parameters.decompress_threads;
}
-bool migrate_use_multifd(void)
-{
- MigrationState *s;
-
- s = migrate_get_current();
-
- return s->capabilities[MIGRATION_CAPABILITY_MULTIFD];
-}
-
int migrate_multifd_channels(void)
{
MigrationState *s;