mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: domain: Assume QEMU_CAPS_BLOCKDEV for the domain private code
Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
fcc231dc79
commit
6695162c76
@ -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;
|
||||
|
@ -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>
|
||||
|
@ -256,6 +256,7 @@
|
||||
<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>
|
||||
|
@ -259,6 +259,7 @@
|
||||
<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>
|
||||
|
@ -288,6 +288,7 @@
|
||||
<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>
|
||||
|
@ -270,6 +270,7 @@
|
||||
<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>
|
||||
|
@ -258,6 +258,7 @@
|
||||
<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>
|
||||
|
@ -308,6 +308,7 @@
|
||||
<libDir path='/tmp'/>
|
||||
<channelTargetDir path='/tmp/channel'/>
|
||||
<allowReboot value='yes'/>
|
||||
<nodename index='0'/>
|
||||
<fdset index='0'/>
|
||||
<blockjobs active='no'/>
|
||||
<agentTimeout>-2</agentTimeout>
|
||||
|
Loading…
Reference in New Issue
Block a user