[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/30] migration: Move migrate_postcopy() to options.c
From: |
Juan Quintela |
Subject: |
[PULL 29/30] migration: Move migrate_postcopy() to options.c |
Date: |
Mon, 24 Apr 2023 15:27:29 +0200 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
---
migration/migration.c | 5 -----
migration/migration.h | 2 --
migration/options.c | 8 ++++++++
migration/options.h | 9 +++++++++
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);
--
2.39.2
- [PULL 09/30] migration: Move migrate_use_multifd() to options.c, (continued)
- [PULL 09/30] migration: Move migrate_use_multifd() to options.c, Juan Quintela, 2023/04/24
- [PULL 25/30] migration: Move migrate_announce_params() to option.c, Juan Quintela, 2023/04/24
- [PULL 22/30] migration: Create migrate_throttle_trigger_threshold(), Juan Quintela, 2023/04/24
- [PULL 26/30] migration: Create migrate_cpu_throttle_initial() to option.c, Juan Quintela, 2023/04/24
- [PULL 30/30] migration: Create migrate_max_bandwidth() function, Juan Quintela, 2023/04/24
- [PULL 12/30] migration: Move migrate_use_block() to options.c, Juan Quintela, 2023/04/24
- [PULL 14/30] migration: Create migrate_rdma_pin_all() function, Juan Quintela, 2023/04/24
- [PULL 15/30] migration: Move migrate_caps_check() to options.c, Juan Quintela, 2023/04/24
- [PULL 20/30] migration: Use migrate_max_postcopy_bandwidth(), Juan Quintela, 2023/04/24
- [PULL 27/30] migration: Create migrate_cpu_throttle_increment() function, Juan Quintela, 2023/04/24
- [PULL 29/30] migration: Move migrate_postcopy() to options.c,
Juan Quintela <=
- [PULL 16/30] migration: Move qmp_query_migrate_capabilities() to options.c, Juan Quintela, 2023/04/24
- [PULL 17/30] migration: Move qmp_migrate_set_capabilities() to options.c, Juan Quintela, 2023/04/24
- [PULL 21/30] migration: Move migrate_use_block_incremental() to option.c, Juan Quintela, 2023/04/24
- [PULL 18/30] migration: Move migrate_cap_set() to options.c, Juan Quintela, 2023/04/24
- [PULL 19/30] migration: Move parameters functions to option.c, Juan Quintela, 2023/04/24
- [PULL 24/30] migration: Create migrate_max_cpu_throttle(), Juan Quintela, 2023/04/24
- [PULL 23/30] migration: Create migrate_checkpoint_delay(), Juan Quintela, 2023/04/24
- [PULL 28/30] migration: Create migrate_cpu_throttle_tailslow() function, Juan Quintela, 2023/04/24
- Re: [PULL 00/30] Migration 20230424 patches, Richard Henderson, 2023/04/24