aboutsummaryrefslogtreecommitdiff
path: root/migration
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2023-03-02 12:08:45 +0100
committerJuan Quintela <quintela@redhat.com>2023-04-27 16:37:28 +0200
commitb7b73122dd12b5fea63347253b428a9af66303c2 (patch)
tree127deca76a88c8b3350c92cb0db425dc476daf31 /migration
parent87c22901094a911e687e2ad014be868a9723c486 (diff)
migration: Move block_cleanup_parameters() to options.c
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Diffstat (limited to 'migration')
-rw-r--r--migration/migration.c10
-rw-r--r--migration/options.c10
-rw-r--r--migration/options.h1
3 files changed, 11 insertions, 10 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 9a42f73aeb..cefe6da2b8 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1164,16 +1164,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 89508d91a3..82adbf35b0 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -600,6 +600,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;
diff --git a/migration/options.h b/migration/options.h
index d261a25441..1fc8d341dd 100644
--- a/migration/options.h
+++ b/migration/options.h
@@ -90,5 +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);
#endif