Signed-off-by: Juan Quintela <quint...@redhat.com> --- migration/migration.c | 10 ---------- migration/options.c | 10 ++++++++++ migration/options.h | 1 + 3 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c index d31e987d1a..f12ab54ae0 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1165,16 +1165,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 0ca2ad4fab..8fae79c2c9 100644 --- a/migration/options.c +++ b/migration/options.c @@ -599,6 +599,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 61b559ff3f..7476f814c9 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 -- 2.39.2