MigrationState is need for tls session build, add MigrationState
into MultiFDSendParams.

Signed-off-by: Chuan Zheng <zhengch...@huawei.com>
Signed-off-by: Yan Jin <jinya...@huawei.com>
---
 migration/multifd.c | 2 ++
 migration/multifd.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/migration/multifd.c b/migration/multifd.c
index d044120..2e04803 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -543,6 +543,7 @@ void multifd_save_cleanup(void)
 
         socket_send_channel_destroy(p->c);
         p->c = NULL;
+        p->s = NULL;
         qemu_mutex_destroy(&p->mutex);
         qemu_sem_destroy(&p->sem);
         qemu_sem_destroy(&p->sem_sync);
@@ -738,6 +739,7 @@ static void multifd_new_send_channel_async(QIOTask *task, 
gpointer opaque)
         object_unref(OBJECT(sioc));
         error_free(local_err);
     } else {
+        p->s = migrate_get_current();
         p->c = QIO_CHANNEL(sioc);
         qio_channel_set_delay(p->c, false);
         p->running = true;
diff --git a/migration/multifd.h b/migration/multifd.h
index 448a03d..8175b3c 100644
--- a/migration/multifd.h
+++ b/migration/multifd.h
@@ -66,6 +66,8 @@ typedef struct {
 } MultiFDPages_t;
 
 typedef struct {
+    /* Migration State */
+    MigrationState *s;
     /* this fields are not changed once the thread is created */
     /* channel number */
     uint8_t id;
-- 
1.8.3.1


Reply via email to