[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 37/43] migration: Move block_cleanup_parameters() to options.c
From: |
Juan Quintela |
Subject: |
[PATCH 37/43] migration: Move block_cleanup_parameters() to options.c |
Date: |
Thu, 2 Mar 2023 17:34:04 +0100 |
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/options.h | 1 +
migration/migration.c | 10 ----------
migration/options.c | 10 ++++++++++
3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/migration/options.h b/migration/options.h
index 0fbe294a65..bd1945d3d1 100644
--- a/migration/options.h
+++ b/migration/options.h
@@ -92,5 +92,6 @@ void migrate_set_block_incremental(bool value);
bool migrate_params_check(MigrationParameters *params, Error **errp);
void migrate_params_init(MigrationParameters *params);
+void block_cleanup_parameters(MigrationState *s);
#endif
diff --git a/migration/migration.c b/migration/migration.c
index f293fb1fd6..5dc0bc86f1 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1162,16 +1162,6 @@ void migrate_set_state(int *state, int old_state, int
new_state)
}
}
-static void block_cleanup_parameters(MigrationState *s)
-{
- if (s->must_remove_block_options) {
- /* setting to false can never fail */
- migrate_cap_set(MIGRATION_CAPABILITY_BLOCK, false, &error_abort);
- migrate_set_block_incremental(false);
- s->must_remove_block_options = false;
- }
-}
-
static void migrate_fd_cleanup(MigrationState *s)
{
qemu_bh_delete(s->cleanup_bh);
diff --git a/migration/options.c b/migration/options.c
index 7838515991..f7d46ccfc9 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -601,6 +601,16 @@ void migrate_set_block_incremental(bool value)
/* parameters helpers */
+void block_cleanup_parameters(MigrationState *s)
+{
+ if (s->must_remove_block_options) {
+ /* setting to false can never fail */
+ migrate_cap_set(MIGRATION_CAPABILITY_BLOCK, false, &error_abort);
+ migrate_set_block_incremental(false);
+ s->must_remove_block_options = false;
+ }
+}
+
AnnounceParameters *migrate_announce_params(void)
{
static AnnounceParameters ap;
--
2.39.2
- [PATCH 26/43] migration: Create migrate_cpu_throttle_increment() function, (continued)
- [PATCH 26/43] migration: Create migrate_cpu_throttle_increment() function, Juan Quintela, 2023/03/02
- [PATCH 28/43] migration: Move migrate_use_tls() to options.c, Juan Quintela, 2023/03/02
- [PATCH 24/43] migration: Move migrate_announce_params() to option.c, Juan Quintela, 2023/03/02
- [PATCH 33/43] migration: Create migrate_params_init() function, Juan Quintela, 2023/03/02
- [PATCH 25/43] migration: Create migrate_cpu_throttle_initial() to option.c, Juan Quintela, 2023/03/02
- [PATCH 30/43] migration: Create migrate_max_bandwidth() function, Juan Quintela, 2023/03/02
- [PATCH 32/43] migration: Move qmp_migrate_set_parameters() to options.c, Juan Quintela, 2023/03/02
- [PATCH 34/43] migration: Make all functions check have the same format, Juan Quintela, 2023/03/02
- [PATCH 23/43] migration: Create migrate_max_cpu_throttle(), Juan Quintela, 2023/03/02
- [PATCH 31/43] migration: Move qmp_query_migrate_parameters() to options.c, Juan Quintela, 2023/03/02
- [PATCH 37/43] migration: Move block_cleanup_parameters() to options.c,
Juan Quintela <=
- [PATCH 39/43] migration: Create migrate_tls_creds() function, Juan Quintela, 2023/03/02
- [PATCH 41/43] migration: Create migrate_tls_hostname() function, Juan Quintela, 2023/03/02
- [PATCH 38/43] migration: Remove MigrationState from block_cleanup_parameters(), Juan Quintela, 2023/03/02
- [PATCH 40/43] migration: Create migrate_tls_authz() function, Juan Quintela, 2023/03/02
- [PATCH 42/43] migration: Create migrate_block_bitmap_mapping() function, Juan Quintela, 2023/03/02
- [PATCH 43/43] migration: Move migration_properties to options.c, Juan Quintela, 2023/03/02
- [PATCH 36/43] migration: Move migrate_set_block_incremental() to options.c, Juan Quintela, 2023/03/02
- Re: [PATCH 00/43] Migration: Create options.c for capabilities/params/properties, Vladimir Sementsov-Ogievskiy, 2023/03/06