mirror of https://github.com/xemu-project/xemu.git
migration/multifd: Remove direct "socket" references
We're about to enable support for other transports in multifd, so remove direct references to sockets. Signed-off-by: Fabiano Rosas <farosas@suse.de> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231012134343.23757-2-farosas@suse.de>
This commit is contained in:
parent
8697eb8577
commit
0e92f64448
|
@ -510,6 +510,11 @@ static void multifd_send_terminate_threads(Error *err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int multifd_send_channel_destroy(QIOChannel *send)
|
||||||
|
{
|
||||||
|
return socket_send_channel_destroy(send);
|
||||||
|
}
|
||||||
|
|
||||||
void multifd_save_cleanup(void)
|
void multifd_save_cleanup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -532,7 +537,7 @@ void multifd_save_cleanup(void)
|
||||||
if (p->registered_yank) {
|
if (p->registered_yank) {
|
||||||
migration_ioc_unregister_yank(p->c);
|
migration_ioc_unregister_yank(p->c);
|
||||||
}
|
}
|
||||||
socket_send_channel_destroy(p->c);
|
multifd_send_channel_destroy(p->c);
|
||||||
p->c = NULL;
|
p->c = NULL;
|
||||||
qemu_mutex_destroy(&p->mutex);
|
qemu_mutex_destroy(&p->mutex);
|
||||||
qemu_sem_destroy(&p->sem);
|
qemu_sem_destroy(&p->sem);
|
||||||
|
@ -890,20 +895,25 @@ static void multifd_new_send_channel_cleanup(MultiFDSendParams *p,
|
||||||
static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque)
|
static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque)
|
||||||
{
|
{
|
||||||
MultiFDSendParams *p = opaque;
|
MultiFDSendParams *p = opaque;
|
||||||
QIOChannel *sioc = QIO_CHANNEL(qio_task_get_source(task));
|
QIOChannel *ioc = QIO_CHANNEL(qio_task_get_source(task));
|
||||||
Error *local_err = NULL;
|
Error *local_err = NULL;
|
||||||
|
|
||||||
trace_multifd_new_send_channel_async(p->id);
|
trace_multifd_new_send_channel_async(p->id);
|
||||||
if (!qio_task_propagate_error(task, &local_err)) {
|
if (!qio_task_propagate_error(task, &local_err)) {
|
||||||
p->c = sioc;
|
p->c = ioc;
|
||||||
qio_channel_set_delay(p->c, false);
|
qio_channel_set_delay(p->c, false);
|
||||||
p->running = true;
|
p->running = true;
|
||||||
if (multifd_channel_connect(p, sioc, local_err)) {
|
if (multifd_channel_connect(p, ioc, local_err)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
multifd_new_send_channel_cleanup(p, sioc, local_err);
|
multifd_new_send_channel_cleanup(p, ioc, local_err);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void multifd_new_send_channel_create(gpointer opaque)
|
||||||
|
{
|
||||||
|
socket_send_channel_create(multifd_new_send_channel_async, opaque);
|
||||||
}
|
}
|
||||||
|
|
||||||
int multifd_save_setup(Error **errp)
|
int multifd_save_setup(Error **errp)
|
||||||
|
@ -952,7 +962,7 @@ int multifd_save_setup(Error **errp)
|
||||||
p->write_flags = 0;
|
p->write_flags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
socket_send_channel_create(multifd_new_send_channel_async, p);
|
multifd_new_send_channel_create(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < thread_count; i++) {
|
for (i = 0; i < thread_count; i++) {
|
||||||
|
|
Loading…
Reference in New Issue