libvirt/a4e6fba0-libxl-rename-threadinfo-struct.patch
James Fehlig bb05d1aab0 Accepting request 935299 from home:jfehlig:branches:Virtualization
- libxl: Fix libvirtd deadlocks and segfaults
  23b51d7b-libxl-disable-death-event.patch,
  a4e6fba0-libxl-rename-threadinfo-struct.patch,
  e4f7589a-libxl-shutdown-thread-name.patch,
  b9a5faea-libxl-handle-death-thread.patch,
  5c5df531-libxl-search-domid-in-thread.patch,
  a7a03324-libxl-protect-logger-access.patch
  bsc#1191668, bsc#1192017

OBS-URL: https://build.opensuse.org/request/show/935299
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=914
2021-12-02 22:43:30 +00:00

64 lines
2.4 KiB
Diff

commit a4e6fba069c0809b8b5dde5e9db62d2efd91b4a0
Author: Jim Fehlig <jfehlig@suse.com>
Date: Wed Nov 24 11:10:19 2021 -0700
libxl: Rename libxlShutdownThreadInfo struct
An upcoming change will use the struct in a thread created to process
death events. Rename libxlShutdownThreadInfo to libxlEventHandlerThreadInfo
to reflect the more generic usage.
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Index: libvirt-7.10.0/src/libxl/libxl_domain.c
===================================================================
--- libvirt-7.10.0.orig/src/libxl/libxl_domain.c
+++ libvirt-7.10.0/src/libxl/libxl_domain.c
@@ -477,7 +477,7 @@ libxlDomainShutdownHandleRestart(libxlDr
}
-struct libxlShutdownThreadInfo
+struct libxlEventHandlerThreadInfo
{
libxlDriverPrivate *driver;
virDomainObj *vm;
@@ -488,7 +488,7 @@ struct libxlShutdownThreadInfo
static void
libxlDomainShutdownThread(void *opaque)
{
- struct libxlShutdownThreadInfo *shutdown_info = opaque;
+ struct libxlEventHandlerThreadInfo *shutdown_info = opaque;
virDomainObj *vm = shutdown_info->vm;
libxl_event *ev = shutdown_info->event;
libxlDriverPrivate *driver = shutdown_info->driver;
@@ -665,7 +665,7 @@ libxlDomainEventHandler(void *data, libx
}
if (event->type == LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN) {
- struct libxlShutdownThreadInfo *shutdown_info = NULL;
+ struct libxlEventHandlerThreadInfo *shutdown_info = NULL;
virThread thread;
g_autofree char *name = NULL;
@@ -673,7 +673,7 @@ libxlDomainEventHandler(void *data, libx
* Start a thread to handle shutdown. We don't want to be tying up
* libxl's event machinery by doing a potentially lengthy shutdown.
*/
- shutdown_info = g_new0(struct libxlShutdownThreadInfo, 1);
+ shutdown_info = g_new0(struct libxlEventHandlerThreadInfo, 1);
shutdown_info->driver = driver;
shutdown_info->vm = vm;
@@ -693,7 +693,7 @@ libxlDomainEventHandler(void *data, libx
}
/*
* virDomainObjEndAPI is called in the shutdown thread, where
- * libxlShutdownThreadInfo and libxl_event are also freed.
+ * libxlEventHandlerThreadInfo and libxl_event are also freed.
*/
return;
} else if (event->type == LIBXL_EVENT_TYPE_DOMAIN_DEATH) {