[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 01/19] migration: Postpone releasing MigrationState.hostname
From: |
Peter Xu |
Subject: |
[PATCH v3 01/19] migration: Postpone releasing MigrationState.hostname |
Date: |
Wed, 30 Mar 2022 17:38:50 -0400 |
We used to release it right after migrate_fd_connect(). That's not good
enough when there're more than one socket pair required, because it'll be
needed to establish TLS connection for the rest channels.
One example is multifd, where we copied over the hostname for each channel
but that's actually not needed.
Keeping the hostname until the cleanup phase of migration.
Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/channel.c | 1 -
migration/migration.c | 5 +++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/migration/channel.c b/migration/channel.c
index c4fc000a1a..c6a8dcf1d7 100644
--- a/migration/channel.c
+++ b/migration/channel.c
@@ -96,6 +96,5 @@ void migration_channel_connect(MigrationState *s,
}
}
migrate_fd_connect(s, error);
- g_free(s->hostname);
error_free(error);
}
diff --git a/migration/migration.c b/migration/migration.c
index 695f0f2900..281d33326b 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1809,6 +1809,11 @@ static void migrate_fd_cleanup(MigrationState *s)
qemu_bh_delete(s->cleanup_bh);
s->cleanup_bh = NULL;
+ if (s->hostname) {
+ g_free(s->hostname);
+ s->hostname = NULL;
+ }
+
qemu_savevm_state_cleanup();
if (s->to_dst_file) {
--
2.32.0
- [PATCH v3 00/19] migration: Postcopy Preemption, Peter Xu, 2022/03/30
- [PATCH v3 01/19] migration: Postpone releasing MigrationState.hostname,
Peter Xu <=
- [PATCH v3 02/19] migration: Drop multifd tls_hostname cache, Peter Xu, 2022/03/30
- [PATCH v3 03/19] migration: Add pss.postcopy_requested status, Peter Xu, 2022/03/30
- [PATCH v3 04/19] migration: Move migrate_allow_multifd and helpers into migration.c, Peter Xu, 2022/03/30
- [PATCH v3 05/19] migration: Export ram_load_postcopy(), Peter Xu, 2022/03/30
- [PATCH v3 06/19] migration: Move channel setup out of postcopy_try_recover(), Peter Xu, 2022/03/30
- [PATCH v3 09/19] migration: Postcopy preemption preparation on channel creation, Peter Xu, 2022/03/30
- [PATCH v3 08/19] migration: Add postcopy-preempt capability, Peter Xu, 2022/03/30
- [PATCH v3 10/19] migration: Postcopy preemption enablement, Peter Xu, 2022/03/30
- [PATCH v3 07/19] migration: Allow migrate-recover to run multiple times, Peter Xu, 2022/03/30
- [PATCH v3 12/19] migration: Create the postcopy preempt channel asynchronously, Peter Xu, 2022/03/30