migration: Remove MigrationState from block_cleanup_parameters()

This makes the function more regular with everything else.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
master
Juan Quintela 2023-03-02 12:10:33 +01:00
parent b7b73122dd
commit b1a8795654
3 changed files with 6 additions and 4 deletions

View File

@ -1218,7 +1218,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);
}
@ -1712,7 +1712,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;
}

View File

@ -600,8 +600,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);

View File

@ -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