]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: domain: Assume QEMU_CAPS_BLOCKDEV for the domain private code
authorPeter Krempa <pkrempa@redhat.com>
Thu, 21 Jul 2022 14:06:33 +0000 (16:06 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 11 Aug 2022 13:24:11 +0000 (15:24 +0200)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_domain.c
tests/qemustatusxml2xmldata/blockjob-mirror-in.xml
tests/qemustatusxml2xmldata/migration-in-params-in.xml
tests/qemustatusxml2xmldata/migration-out-nbd-out.xml
tests/qemustatusxml2xmldata/migration-out-nbd-tls-out.xml
tests/qemustatusxml2xmldata/migration-out-params-in.xml
tests/qemustatusxml2xmldata/upgrade-out.xml
tests/qemustatusxml2xmldata/vcpus-multi-in.xml

index bf3441590a811849763ee73c7201c00a20fc4b02..617048faef214a2eeb31dfcfa373ed1d2d6b50e8 100644 (file)
@@ -2175,8 +2175,7 @@ qemuDomainObjPrivateXMLFormatBlockjobs(virBuffer *buf,
     virBufferAsprintf(&attrBuf, " active='%s'",
                       virTristateBoolTypeToString(virTristateBoolFromBool(bj)));
 
-    if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV) &&
-        virHashForEachSorted(priv->blockjobs,
+    if (virHashForEachSorted(priv->blockjobs,
                              qemuDomainObjPrivateXMLFormatBlockjobIterator,
                              &iterdata) < 0)
         return -1;
@@ -2396,8 +2395,7 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf,
 
     qemuDomainObjPrivateXMLFormatPR(buf, priv);
 
-    if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV))
-        virBufferAsprintf(buf, "<nodename index='%llu'/>\n", priv->nodenameindex);
+    virBufferAsprintf(buf, "<nodename index='%llu'/>\n", priv->nodenameindex);
 
     virBufferAsprintf(buf, "<fdset index='%u'/>\n", priv->fdsetindex);
 
@@ -2825,15 +2823,13 @@ qemuDomainObjPrivateXMLParseBlockjobs(virDomainObj *vm,
         (tmp = virTristateBoolTypeFromString(active)) > 0)
         priv->reconnectBlockjobs = tmp;
 
-    if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) {
-        if ((nnodes = virXPathNodeSet("./blockjobs/blockjob", ctxt, &nodes)) < 0)
-            return -1;
+    if ((nnodes = virXPathNodeSet("./blockjobs/blockjob", ctxt, &nodes)) < 0)
+        return -1;
 
-        for (i = 0; i < nnodes; i++) {
-            if (qemuDomainObjPrivateXMLParseBlockjobData(vm, nodes[i], ctxt,
-                                                         priv->driver->xmlopt) < 0)
-                return -1;
-        }
+    for (i = 0; i < nnodes; i++) {
+        if (qemuDomainObjPrivateXMLParseBlockjobData(vm, nodes[i], ctxt,
+                                                     priv->driver->xmlopt) < 0)
+            return -1;
     }
 
     return 0;
index 73fe437f87d0a1b01a249465b9f9c4d9b7358a51..e9f1d77856a5093c57a7b503296c1bdfb504fe8c 100644 (file)
@@ -22,6 +22,7 @@
   <libDir path='/tmp'/>
   <channelTargetDir path='/tmp/channel'/>
   <allowReboot value='yes'/>
+  <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='yes'/>
   <agentTimeout>-2</agentTimeout>
index 1086f5230d7096f2d51dacdcca42f12fabdef966..03773a089b3ab340c33fa27a5107435e615d293f 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-nest'/>
   <chardevStdioLogd/>
   <allowReboot value='yes'/>
+  <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
   <agentTimeout>-2</agentTimeout>
index 540e385de335e352bd1ac735e74b4cde9d55758b..de92146eaacb42f78acdc8c28c782057feaabb08 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-upstream'/>
   <chardevStdioLogd/>
   <allowReboot value='yes'/>
+  <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
   <agentTimeout>-2</agentTimeout>
index d0e997913f4a41a0d07259f78394d0aae8cab2af..6bdd12825969d6d7f6055ee7c698c50f5d4ad9b6 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-3-upstream'/>
   <chardevStdioLogd/>
   <allowReboot value='yes'/>
+  <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
   <agentTimeout>-2</agentTimeout>
index 758a6f03b7a491858797a84808de2ea1252f0f21..24ee86e4c04eb5c83e6d41f3fcfda34be9347f27 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-7-nest'/>
   <chardevStdioLogd/>
   <allowReboot value='yes'/>
+  <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
   <agentTimeout>-2</agentTimeout>
index ac2ffeddc22dacff95d066f75549138e8e850000..e663b3dbb5e9c9e608dab4307af489d79fc9e234 100644 (file)
   <channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-upstream'/>
   <chardevStdioLogd/>
   <allowReboot value='yes'/>
+  <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
   <agentTimeout>-2</agentTimeout>
index 0b8bc37c152f258c63095d6c723ac23ccb3930d9..e71d6a83c70b66df1b289c6e63e0798789cb3fd7 100644 (file)
   <libDir path='/tmp'/>
   <channelTargetDir path='/tmp/channel'/>
   <allowReboot value='yes'/>
+  <nodename index='0'/>
   <fdset index='0'/>
   <blockjobs active='no'/>
   <agentTimeout>-2</agentTimeout>