[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/43] migration: Move migrate_use_return() to options.c
From: |
Juan Quintela |
Subject: |
[PATCH 12/43] migration: Move migrate_use_return() to options.c |
Date: |
Thu, 2 Mar 2023 17:33:39 +0100 |
Once that we are there, we rename the function to migrate_return_path()
to be consistent with all other capabilities.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/migration.h | 1 -
migration/options.h | 1 +
migration/migration.c | 11 +----------
migration/options.c | 9 +++++++++
4 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/migration/migration.h b/migration/migration.h
index ecd6f7658d..34fbaa15a3 100644
--- a/migration/migration.h
+++ b/migration/migration.h
@@ -420,7 +420,6 @@ uint64_t migrate_xbzrle_cache_size(void);
bool migrate_use_block_incremental(void);
int migrate_max_cpu_throttle(void);
-bool migrate_use_return_path(void);
uint64_t ram_get_total_transferred_pages(void);
diff --git a/migration/options.h b/migration/options.h
index 541a4a2026..51c7f2a043 100644
--- a/migration/options.h
+++ b/migration/options.h
@@ -33,6 +33,7 @@ bool migrate_postcopy_blocktime(void);
bool migrate_postcopy_preempt(void);
bool migrate_postcopy_ram(void);
bool migrate_release_ram(void);
+bool migrate_return_path(void);
bool migrate_validate_uuid(void);
bool migrate_xbzrle(void);
bool migrate_zero_blocks(void);
diff --git a/migration/migration.c b/migration/migration.c
index 66847e52cc..8424eaf2e2 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2620,15 +2620,6 @@ static int64_t migrate_max_postcopy_bandwidth(void)
return s->parameters.max_postcopy_bandwidth;
}
-bool migrate_use_return_path(void)
-{
- MigrationState *s;
-
- s = migrate_get_current();
-
- return s->capabilities[MIGRATION_CAPABILITY_RETURN_PATH];
-}
-
bool migrate_use_block_incremental(void)
{
MigrationState *s;
@@ -4167,7 +4158,7 @@ void migrate_fd_connect(MigrationState *s, Error
*error_in)
* precopy, only if user specified "return-path" capability would
* QEMU uses the return path.
*/
- if (migrate_postcopy_ram() || migrate_use_return_path()) {
+ if (migrate_postcopy_ram() || migrate_return_path()) {
if (open_return_path_on_source(s, !resume)) {
error_report("Unable to open return-path for postcopy");
migrate_set_state(&s->state, s->state, MIGRATION_STATUS_FAILED);
diff --git a/migration/options.c b/migration/options.c
index 66735c1cd9..c1182bf01a 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -149,6 +149,15 @@ bool migrate_release_ram(void)
return s->capabilities[MIGRATION_CAPABILITY_RELEASE_RAM];
}
+bool migrate_return_path(void)
+{
+ MigrationState *s;
+
+ s = migrate_get_current();
+
+ return s->capabilities[MIGRATION_CAPABILITY_RETURN_PATH];
+}
+
bool migrate_validate_uuid(void)
{
MigrationState *s;
--
2.39.2
- [PATCH 03/43] migration: Create migration_cap_set(), (continued)
- [PATCH 03/43] migration: Create migration_cap_set(), Juan Quintela, 2023/03/02
- [PATCH 04/43] migration: create options.c, Juan Quintela, 2023/03/02
- [PATCH 06/43] migration: Move migrate_use_compression() to options.c, Juan Quintela, 2023/03/02
- [PATCH 05/43] migration: Move migrate_colo_enabled() to options.c, Juan Quintela, 2023/03/02
- [PATCH 09/43] migration: Move migrate_use_zero_copy_send() to options.c, Juan Quintela, 2023/03/02
- [PATCH 08/43] migration: Move migrate_use_multifd() to options.c, Juan Quintela, 2023/03/02
- [PATCH 07/43] migration: Move migrate_use_events() to options.c, Juan Quintela, 2023/03/02
- [PATCH 10/43] migration: Move migrate_use_xbzrle() to options.c, Juan Quintela, 2023/03/02
- [PATCH 12/43] migration: Move migrate_use_return() to options.c,
Juan Quintela <=
- [PATCH 11/43] migration: Move migrate_use_block() to options.c, Juan Quintela, 2023/03/02
- [PATCH 13/43] migration: Create migrate_rdma_pin_all() function, Juan Quintela, 2023/03/02
- [PATCH 15/43] migration: Move qmp_query_migrate_capabilities() to options.c, Juan Quintela, 2023/03/02
- [PATCH 14/43] migration: Move migrate_caps_check() to options.c, Juan Quintela, 2023/03/02
- [PATCH 16/43] migration: Move qmp_migrate_set_capabilities() to options.c, Juan Quintela, 2023/03/02
- [PATCH 17/43] migration: Move migrate_cap_set() to options.c, Juan Quintela, 2023/03/02
- [PATCH 18/43] migration: Move parameters functions to option.c, Juan Quintela, 2023/03/02
- [PATCH 19/43] migration: Use migrate_max_postcopy_bandwidth(), Juan Quintela, 2023/03/02
- [PATCH 20/43] migration: Move migrate_use_block_incremental() to option.c, Juan Quintela, 2023/03/02
- [PATCH 21/43] migration: Create migrate_throttle_trigger_threshold(), Juan Quintela, 2023/03/02