Add a file descriptor set to the QEMU private domain structure. Stefan Berger <stefanb@xxxxxxxxxxxxxxxxxx> --- src/qemu/qemu_domain.c | 9 ++++++++- src/qemu/qemu_domain.h | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) Index: libvirt/src/qemu/qemu_domain.c =================================================================== --- libvirt.orig/src/qemu/qemu_domain.c +++ libvirt/src/qemu/qemu_domain.c @@ -37,6 +37,7 @@ #include "domain_event.h" #include "virtime.h" #include "virstoragefile.h" +#include "virbitmap.h" #include <sys/time.h> #include <fcntl.h> @@ -215,13 +216,18 @@ static void *qemuDomainObjPrivateAlloc(v if (qemuDomainObjInitJob(priv) < 0) goto error; - if (!(priv->devs = virChrdevAlloc())) + if (!(priv->fdset = virBitmapNew(4096))) goto error; + if (!(priv->devs = virChrdevAlloc())) + goto error_free_bitmap; + priv->migMaxBandwidth = QEMU_DOMAIN_MIG_BANDWIDTH_MAX; return priv; +error_free_bitmap: + virBitmapFree(priv->fdset); error: VIR_FREE(priv); return NULL; @@ -252,6 +258,7 @@ static void qemuDomainObjPrivateFree(voi qemuAgentClose(priv->agent); } VIR_FREE(priv->cleanupCallbacks); + virBitmapFree(priv->fdset); VIR_FREE(priv); } Index: libvirt/src/qemu/qemu_domain.h =================================================================== --- libvirt.orig/src/qemu/qemu_domain.h +++ libvirt/src/qemu/qemu_domain.h @@ -32,6 +32,7 @@ # include "qemu_conf.h" # include "qemu_capabilities.h" # include "virchrdev.h" +# include "virbitmap.h" # define QEMU_EXPECTED_VIRT_TYPES \ ((1 << VIR_DOMAIN_VIRT_QEMU) | \ @@ -160,6 +161,8 @@ struct _qemuDomainObjPrivate { qemuDomainCleanupCallback *cleanupCallbacks; size_t ncleanupCallbacks; size_t ncleanupCallbacks_max; + + virBitmapPtr fdset; }; struct qemuDomainWatchdogEvent -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list