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>
diff --git a/migration/migration.c b/migration/migration.c
index 9a42f73..cefe6da 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1164,16 +1164,6 @@
}
}
-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 89508d9..82adbf3 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -600,6 +600,16 @@
/* 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 d261a25..1fc8d34 100644
--- a/migration/options.h
+++ b/migration/options.h
@@ -90,5 +90,6 @@
bool migrate_params_check(MigrationParameters *params, Error **errp);
void migrate_params_init(MigrationParameters *params);
+void block_cleanup_parameters(MigrationState *s);
#endif