mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 10:35:20 +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'",
|
virBufferAsprintf(&attrBuf, " active='%s'",
|
||||||
virTristateBoolTypeToString(virTristateBoolFromBool(bj)));
|
virTristateBoolTypeToString(virTristateBoolFromBool(bj)));
|
||||||
|
|
||||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV) &&
|
if (virHashForEachSorted(priv->blockjobs,
|
||||||
virHashForEachSorted(priv->blockjobs,
|
|
||||||
qemuDomainObjPrivateXMLFormatBlockjobIterator,
|
qemuDomainObjPrivateXMLFormatBlockjobIterator,
|
||||||
&iterdata) < 0)
|
&iterdata) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -2396,7 +2395,6 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf,
|
|||||||
|
|
||||||
qemuDomainObjPrivateXMLFormatPR(buf, priv);
|
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);
|
virBufferAsprintf(buf, "<fdset index='%u'/>\n", priv->fdsetindex);
|
||||||
@ -2825,7 +2823,6 @@ qemuDomainObjPrivateXMLParseBlockjobs(virDomainObj *vm,
|
|||||||
(tmp = virTristateBoolTypeFromString(active)) > 0)
|
(tmp = virTristateBoolTypeFromString(active)) > 0)
|
||||||
priv->reconnectBlockjobs = tmp;
|
priv->reconnectBlockjobs = tmp;
|
||||||
|
|
||||||
if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_BLOCKDEV)) {
|
|
||||||
if ((nnodes = virXPathNodeSet("./blockjobs/blockjob", ctxt, &nodes)) < 0)
|
if ((nnodes = virXPathNodeSet("./blockjobs/blockjob", ctxt, &nodes)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -2834,7 +2831,6 @@ qemuDomainObjPrivateXMLParseBlockjobs(virDomainObj *vm,
|
|||||||
priv->driver->xmlopt) < 0)
|
priv->driver->xmlopt) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
<libDir path='/tmp'/>
|
<libDir path='/tmp'/>
|
||||||
<channelTargetDir path='/tmp/channel'/>
|
<channelTargetDir path='/tmp/channel'/>
|
||||||
<allowReboot value='yes'/>
|
<allowReboot value='yes'/>
|
||||||
|
<nodename index='0'/>
|
||||||
<fdset index='0'/>
|
<fdset index='0'/>
|
||||||
<blockjobs active='yes'/>
|
<blockjobs active='yes'/>
|
||||||
<agentTimeout>-2</agentTimeout>
|
<agentTimeout>-2</agentTimeout>
|
||||||
|
@ -256,6 +256,7 @@
|
|||||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-nest'/>
|
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-nest'/>
|
||||||
<chardevStdioLogd/>
|
<chardevStdioLogd/>
|
||||||
<allowReboot value='yes'/>
|
<allowReboot value='yes'/>
|
||||||
|
<nodename index='0'/>
|
||||||
<fdset index='0'/>
|
<fdset index='0'/>
|
||||||
<blockjobs active='no'/>
|
<blockjobs active='no'/>
|
||||||
<agentTimeout>-2</agentTimeout>
|
<agentTimeout>-2</agentTimeout>
|
||||||
|
@ -259,6 +259,7 @@
|
|||||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-upstream'/>
|
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-4-upstream'/>
|
||||||
<chardevStdioLogd/>
|
<chardevStdioLogd/>
|
||||||
<allowReboot value='yes'/>
|
<allowReboot value='yes'/>
|
||||||
|
<nodename index='0'/>
|
||||||
<fdset index='0'/>
|
<fdset index='0'/>
|
||||||
<blockjobs active='no'/>
|
<blockjobs active='no'/>
|
||||||
<agentTimeout>-2</agentTimeout>
|
<agentTimeout>-2</agentTimeout>
|
||||||
|
@ -288,6 +288,7 @@
|
|||||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-3-upstream'/>
|
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-3-upstream'/>
|
||||||
<chardevStdioLogd/>
|
<chardevStdioLogd/>
|
||||||
<allowReboot value='yes'/>
|
<allowReboot value='yes'/>
|
||||||
|
<nodename index='0'/>
|
||||||
<fdset index='0'/>
|
<fdset index='0'/>
|
||||||
<blockjobs active='no'/>
|
<blockjobs active='no'/>
|
||||||
<agentTimeout>-2</agentTimeout>
|
<agentTimeout>-2</agentTimeout>
|
||||||
|
@ -270,6 +270,7 @@
|
|||||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-7-nest'/>
|
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-7-nest'/>
|
||||||
<chardevStdioLogd/>
|
<chardevStdioLogd/>
|
||||||
<allowReboot value='yes'/>
|
<allowReboot value='yes'/>
|
||||||
|
<nodename index='0'/>
|
||||||
<fdset index='0'/>
|
<fdset index='0'/>
|
||||||
<blockjobs active='no'/>
|
<blockjobs active='no'/>
|
||||||
<agentTimeout>-2</agentTimeout>
|
<agentTimeout>-2</agentTimeout>
|
||||||
|
@ -258,6 +258,7 @@
|
|||||||
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-upstream'/>
|
<channelTargetDir path='/var/lib/libvirt/qemu/channel/target/domain-1-upstream'/>
|
||||||
<chardevStdioLogd/>
|
<chardevStdioLogd/>
|
||||||
<allowReboot value='yes'/>
|
<allowReboot value='yes'/>
|
||||||
|
<nodename index='0'/>
|
||||||
<fdset index='0'/>
|
<fdset index='0'/>
|
||||||
<blockjobs active='no'/>
|
<blockjobs active='no'/>
|
||||||
<agentTimeout>-2</agentTimeout>
|
<agentTimeout>-2</agentTimeout>
|
||||||
|
@ -308,6 +308,7 @@
|
|||||||
<libDir path='/tmp'/>
|
<libDir path='/tmp'/>
|
||||||
<channelTargetDir path='/tmp/channel'/>
|
<channelTargetDir path='/tmp/channel'/>
|
||||||
<allowReboot value='yes'/>
|
<allowReboot value='yes'/>
|
||||||
|
<nodename index='0'/>
|
||||||
<fdset index='0'/>
|
<fdset index='0'/>
|
||||||
<blockjobs active='no'/>
|
<blockjobs active='no'/>
|
||||||
<agentTimeout>-2</agentTimeout>
|
<agentTimeout>-2</agentTimeout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user