Blame SOURCES/libvirt-python-Add-VIR_DOMAIN_IOTHREAD_THREAD_POOL_-MIN-MAX-macros.patch

c65a42
From 75d1f57e95c4447a607b8007da54af5bbec34850 Mon Sep 17 00:00:00 2001
c65a42
Message-Id: <75d1f57e95c4447a607b8007da54af5bbec34850@dist-git>
c65a42
From: Michal Privoznik <mprivozn@redhat.com>
c65a42
Date: Thu, 7 Jul 2022 16:04:10 +0200
c65a42
Subject: [PATCH] Add VIR_DOMAIN_IOTHREAD_THREAD_POOL_{MIN,MAX} macros
c65a42
c65a42
The python version of virDomainSetIOThreadParams
c65a42
(setIOThreadParams()), expects two arguments on input: the thread
c65a42
ID and a dictionary which is then translated into our typed
c65a42
parameters. During this translation we use a helper array which
c65a42
holds type for each typed parameter supported
c65a42
(virPyDomainSetIOThreadParams[]). Otherwise we guess what the
c65a42
correct type is. Now, when introducing
c65a42
VIR_DOMAIN_IOTHREAD_THREAD_POOL_{MIN,MAX} typed params into
c65a42
libvirt I forgot to update the array. Do that now.
c65a42
c65a42
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
c65a42
(cherry picked from commit b943a5bd18b4cc765719c0dbc628a077c3db4d52)
c65a42
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2117475
c65a42
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
c65a42
---
c65a42
 libvirt-override.c | 4 ++++
c65a42
 1 file changed, 4 insertions(+)
c65a42
c65a42
diff --git a/libvirt-override.c b/libvirt-override.c
c65a42
index cba67d9..2a2a7dd 100644
c65a42
--- a/libvirt-override.c
c65a42
+++ b/libvirt-override.c
c65a42
@@ -1695,6 +1695,10 @@ static virPyTypedParamsHint virPyDomainSetIOThreadParams[] = {
c65a42
     { VIR_DOMAIN_IOTHREAD_POLL_MAX_NS, VIR_TYPED_PARAM_ULLONG },
c65a42
     { VIR_DOMAIN_IOTHREAD_POLL_GROW, VIR_TYPED_PARAM_UINT },
c65a42
     { VIR_DOMAIN_IOTHREAD_POLL_SHRINK, VIR_TYPED_PARAM_UINT },
c65a42
+# if LIBVIR_CHECK_VERSION(8, 5, 0)
c65a42
+    { VIR_DOMAIN_IOTHREAD_THREAD_POOL_MIN, VIR_TYPED_PARAM_INT },
c65a42
+    { VIR_DOMAIN_IOTHREAD_THREAD_POOL_MAX, VIR_TYPED_PARAM_INT },
c65a42
+# endif /*  LIBVIR_CHECK_VERSION(8, 5, 0) */
c65a42
 };
c65a42
 
c65a42
 static PyObject *
c65a42
-- 
c65a42
2.35.1
c65a42