aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-03-02 10:44:20 +0100
committerJuan Quintela <quintela@redhat.com>2023-04-24 15:01:47 +0200
commitf774fde5d4e97cbfc64dab6622c2c53c5fe5c9fe (patch)
treedf1689f46daca0c0ef17f148b6c19be7279947a9 /migration
parent873f674c559e3162a6e6e92994301d400c5cc873 (diff)
migration: Move migrate_postcopy() to options.c
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c5
-rw-r--r--migration/migration.h2
-rw-r--r--migration/options.c8
-rw-r--r--migration/options.h9
4 files changed, 17 insertions, 7 deletions
diff --git a/migration/migration.c b/migration/migration.c
index dccad95a55..f20d7bcc06 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2245,11 +2245,6 @@ void qmp_migrate_continue(MigrationStatus state, Error **errp)
qemu_sem_post(&s->pause_sem);
}
-bool migrate_postcopy(void)
-{
- return migrate_postcopy_ram() || migrate_dirty_bitmaps();
-}
-
int migrate_use_tls(void)
{
MigrationState *s;
diff --git a/migration/migration.h b/migration/migration.h
index 3ae938b19c..dcf906868d 100644
--- a/migration/migration.h
+++ b/migration/migration.h
@@ -447,8 +447,6 @@ bool migration_is_blocked(Error **errp);
bool migration_in_postcopy(void);
MigrationState *migrate_get_current(void);
-bool migrate_postcopy(void);
-
int migrate_use_tls(void);
uint64_t ram_get_total_transferred_pages(void);
diff --git a/migration/options.c b/migration/options.c
index 615534c151..8bd2d949ae 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -204,6 +204,14 @@ bool migrate_zero_copy_send(void)
return s->capabilities[MIGRATION_CAPABILITY_ZERO_COPY_SEND];
}
+
+/* pseudo capabilities */
+
+bool migrate_postcopy(void)
+{
+ return migrate_postcopy_ram() || migrate_dirty_bitmaps();
+}
+
typedef enum WriteTrackingSupport {
WT_SUPPORT_UNKNOWN = 0,
WT_SUPPORT_ABSENT,
diff --git a/migration/options.h b/migration/options.h
index 99f6bbd7a1..093bc907a1 100644
--- a/migration/options.h
+++ b/migration/options.h
@@ -38,6 +38,15 @@ bool migrate_xbzrle(void);
bool migrate_zero_blocks(void);
bool migrate_zero_copy_send(void);
+/*
+ * pseudo capabilities
+ *
+ * These are functions that are used in a similar way to capabilities
+ * check, but they are not a capability.
+ */
+
+bool migrate_postcopy(void);
+
/* capabilities helpers */
bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp);