separate virDomainDefParseIoThreadInfo from virDomainDefParseXML
---
 src/conf/domain_conf.c | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4453621..1d74631 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -18986,6 +18986,16 @@ virDomainDefParseVcpuInfo(virDomainParseTotalParamPtr 
param)
 }
 
 
+static int
+virDomainDefParseIoThreadInfo(virDomainParseTotalParamPtr param)
+{
+    if (virDomainDefParseIOThreads(param->def, param->ctxt) < 0)
+        return -1;
+
+    return 0;
+}
+
+
 static virDomainDefPtr
 virDomainDefParseXML(xmlDocPtr xml,
                      xmlNodePtr root,
@@ -19034,6 +19044,7 @@ virDomainDefParseXML(xmlDocPtr xml,
             virDomainDefParseMemoryInfo,
             virDomainDefParseBikiotuneInfo,
             virDomainDefParseVcpuInfo,
+            virDomainDefParseIoThreadInfo,
             NULL
     };
 
@@ -19061,9 +19072,6 @@ virDomainDefParseXML(xmlDocPtr xml,
         fun_index++;
     }
 
-    if (virDomainDefParseIOThreads(def, ctxt) < 0)
-        goto error;
-
     /* Extract cpu tunables. */
     if ((n = virXPathULongLong("string(./cputune/shares[1])", ctxt,
                                &def->cputune.shares)) < -1) {
-- 
2.8.3


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to