[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/9] migration: Add cleanup hook for inwards migration
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 5/9] migration: Add cleanup hook for inwards migration |
Date: |
Wed, 9 Jun 2021 15:45:08 +0100 |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
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: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20210421112834.107651-4-dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/migration.c | 3 +++
migration/migration.h | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/migration/migration.c b/migration/migration.c
index 1885860d7b..393299e150 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -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);
diff --git a/migration/migration.h b/migration/migration.h
index b88bd8fe07..2ebb740dfa 100644
--- a/migration/migration.h
+++ b/migration/migration.h
@@ -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.
--
2.31.1
- [PULL 0/9] migration queue, Dr. David Alan Gilbert (git), 2021/06/09
- [PULL 1/9] yank: Unregister function when using TLS migration, Dr. David Alan Gilbert (git), 2021/06/09
- [PULL 2/9] migration/rdma: Fix cm event use after free, Dr. David Alan Gilbert (git), 2021/06/09
- [PULL 3/9] channel-socket: Only set CLOEXEC if we have space for fds, Dr. David Alan Gilbert (git), 2021/06/09
- [PULL 4/9] io/net-listener: Call the notifier during finalize, Dr. David Alan Gilbert (git), 2021/06/09
- [PULL 6/9] migration/socket: Close the listener at the end, Dr. David Alan Gilbert (git), 2021/06/09
- [PULL 7/9] sockets: Support multipath TCP, Dr. David Alan Gilbert (git), 2021/06/09
- [PULL 5/9] migration: Add cleanup hook for inwards migration,
Dr. David Alan Gilbert (git) <=
- [PULL 9/9] hmp: Add "calc_dirty_rate" and "info dirty_rate" cmds, Dr. David Alan Gilbert (git), 2021/06/09
- [PULL 8/9] migration/dirtyrate: make sample page count configurable, Dr. David Alan Gilbert (git), 2021/06/09
- Re: [PULL 0/9] migration queue, Peter Maydell, 2021/06/09
- Re: [PULL 0/9] migration queue, no-reply, 2021/06/14