[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 38/43] migration: Remove MigrationState from block_cleanup_par
From: |
Juan Quintela |
Subject: |
[PATCH v2 38/43] migration: Remove MigrationState from block_cleanup_parameters() |
Date: |
Thu, 20 Apr 2023 15:39:57 +0200 |
This makes the function more regular with everything else.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
migration/migration.c | 4 ++--
migration/options.c | 4 +++-
migration/options.h | 2 +-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index f12ab54ae0..4742f14686 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1219,7 +1219,7 @@ static void migrate_fd_cleanup(MigrationState *s)
error_report_err(error_copy(s->error));
}
notifier_list_notify(&migration_state_notifiers, s);
- block_cleanup_parameters(s);
+ block_cleanup_parameters();
yank_unregister_instance(MIGRATION_YANK_INSTANCE);
}
@@ -1713,7 +1713,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
"a valid migration protocol");
migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
MIGRATION_STATUS_FAILED);
- block_cleanup_parameters(s);
+ block_cleanup_parameters();
return;
}
diff --git a/migration/options.c b/migration/options.c
index 8fae79c2c9..da70f62693 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -599,8 +599,10 @@ void migrate_set_block_incremental(bool value)
/* parameters helpers */
-void block_cleanup_parameters(MigrationState *s)
+void block_cleanup_parameters(void)
{
+ MigrationState *s = migrate_get_current();
+
if (s->must_remove_block_options) {
/* setting to false can never fail */
migrate_cap_set(MIGRATION_CAPABILITY_BLOCK, false, &error_abort);
diff --git a/migration/options.h b/migration/options.h
index 7476f814c9..2981da21f0 100644
--- a/migration/options.h
+++ b/migration/options.h
@@ -90,6 +90,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);
+void block_cleanup_parameters(void);
#endif
--
2.39.2
- [PATCH v2 27/43] migration: Create migrate_cpu_throttle_tailslow() function, (continued)
- [PATCH v2 27/43] migration: Create migrate_cpu_throttle_tailslow() function, Juan Quintela, 2023/04/20
- [PATCH v2 34/43] migration: Make all functions check have the same format, Juan Quintela, 2023/04/20
- [PATCH v2 28/43] migration: Move migrate_use_tls() to options.c, Juan Quintela, 2023/04/20
- [PATCH v2 31/43] migration: Move qmp_query_migrate_parameters() to options.c, Juan Quintela, 2023/04/20
- [PATCH v2 32/43] migration: Move qmp_migrate_set_parameters() to options.c, Juan Quintela, 2023/04/20
- [PATCH v2 35/43] migration: Create migrate_downtime_limit() function, Juan Quintela, 2023/04/20
- [PATCH v2 36/43] migration: Move migrate_set_block_incremental() to options.c, Juan Quintela, 2023/04/20
- [PATCH v2 38/43] migration: Remove MigrationState from block_cleanup_parameters(),
Juan Quintela <=
- [PATCH v2 39/43] migration: Create migrate_tls_creds() function, Juan Quintela, 2023/04/20
- [PATCH v2 41/43] migration: Create migrate_tls_hostname() function, Juan Quintela, 2023/04/20
- [PATCH v2 33/43] migration: Create migrate_params_init() function, Juan Quintela, 2023/04/20
- [PATCH v2 43/43] migration: Move migration_properties to options.c, Juan Quintela, 2023/04/20
- [PATCH v2 40/43] migration: Create migrate_tls_authz() function, Juan Quintela, 2023/04/20
- [PATCH v2 37/43] migration: Move block_cleanup_parameters() to options.c, Juan Quintela, 2023/04/20
- [PATCH v2 42/43] migration: Create migrate_block_bitmap_mapping() function, Juan Quintela, 2023/04/20