Skip to content
Snippets Groups Projects
Commit 1df6ddb4 authored by Dr. David Alan Gilbert's avatar Dr. David Alan Gilbert
Browse files

migration: Add cleanup hook for inwards migration


Add a cleanup hook for incoming migration that gets called
at the end as a way for a transport to allow cleanup.

Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Message-Id: <20210421112834.107651-4-dgilbert@redhat.com>
Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
parent 5b6116d3
No related branches found
No related tags found
No related merge requests found
......@@ -280,6 +280,9 @@ void migration_incoming_state_destroy(void)
g_array_free(mis->postcopy_remote_fds, TRUE);
mis->postcopy_remote_fds = NULL;
}
if (mis->transport_cleanup) {
mis->transport_cleanup(mis->transport_data);
}
qemu_event_reset(&mis->main_thread_load_event);
......
......@@ -49,6 +49,10 @@ struct PostcopyBlocktimeContext;
struct MigrationIncomingState {
QEMUFile *from_src_file;
/* A hook to allow cleanup at the end of incoming migration */
void *transport_data;
void (*transport_cleanup)(void *data);
/*
* Free at the start of the main state load, set as the main thread finishes
* loading state.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment