migration: Move block_cleanup_parameters() to options.c
authorJuan Quintela <quintela@redhat.com>
Thu, 2 Mar 2023 11:08:45 +0000 (12:08 +0100)
committerJuan Quintela <quintela@redhat.com>
Thu, 27 Apr 2023 14:37:28 +0000 (16:37 +0200)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
migration/migration.c
migration/options.c
migration/options.h

index 9a42f73aebc1f93d5a14da70c4546e98afe65c7b..cefe6da2b8436af3ba6a62123ba64862ff95e577 100644 (file)
@@ -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);
index 89508d91a3e6bb1e946d457cd930294b97e01761..82adbf35b03ceab795908ea53d912a5b06263770 100644 (file)
@@ -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;
index d261a254418eb3e5314c59a2b28d504efe6270e9..1fc8d341dd7035a2e9ac7aaf543f15057821d6d6 100644 (file)
@@ -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