提交 1f89039d 编写于 作者: J John Ferlan

qemu: Move setting of conf_disk in qemuDomainSetBlockIoTune

Since persistent_def is the only place that uses it, let's just keep
it closer to where it's used.
上级 0ac8b70b
...@@ -17455,15 +17455,6 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, ...@@ -17455,15 +17455,6 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
goto endjob; goto endjob;
} }
if (persistentDef) {
if (!(conf_disk = virDomainDiskByName(persistentDef, path, true))) {
virReportError(VIR_ERR_INVALID_ARG,
_("missing persistent configuration for disk '%s'"),
path);
goto endjob;
}
}
if (def) { if (def) {
supportMaxOptions = virQEMUCapsGet(priv->qemuCaps, supportMaxOptions = virQEMUCapsGet(priv->qemuCaps,
QEMU_CAPS_DRIVE_IOTUNE_MAX); QEMU_CAPS_DRIVE_IOTUNE_MAX);
...@@ -17556,6 +17547,12 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, ...@@ -17556,6 +17547,12 @@ qemuDomainSetBlockIoTune(virDomainPtr dom,
} }
if (persistentDef) { if (persistentDef) {
if (!(conf_disk = virDomainDiskByName(persistentDef, path, true))) {
virReportError(VIR_ERR_INVALID_ARG,
_("missing persistent configuration for disk '%s'"),
path);
goto endjob;
}
oldinfo = &conf_disk->blkdeviotune; oldinfo = &conf_disk->blkdeviotune;
if (!set_bytes) { if (!set_bytes) {
info.total_bytes_sec = oldinfo->total_bytes_sec; info.total_bytes_sec = oldinfo->total_bytes_sec;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册