提交 72b4151f 编写于 作者: L Luyao Huang 提交者: John Ferlan

qemu: Fix get blkiodevtune for a disk that has been hot unplugged

https://bugzilla.redhat.com/show_bug.cgi?id=1164080

After a disk is hotunplugged a subsequent call to qemuDomainGetBlockIoTune
to get the --config settings of that disk will fail because the disk is no
longer found by qemuDiskPathToAlias causing an unexpected failure.

Since only the --live flag needs to have the disk device pointer, move the
fetch inside the (flags & VIR_DOMAIN_AFFECT_LIVE) condition. This will also
affect the results if no flags are provided or the --current flag is provided.
Signed-off-by: NLuyao Huang <lhuang@redhat.com>
上级 5c08b125
......@@ -17017,11 +17017,10 @@ qemuDomainGetBlockIoTune(virDomainPtr dom,
goto endjob;
}
device = qemuDiskPathToAlias(vm, disk, NULL);
if (!device)
goto endjob;
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
device = qemuDiskPathToAlias(vm, disk, NULL);
if (!device)
goto endjob;
qemuDomainObjEnterMonitor(driver, vm);
ret = qemuMonitorGetBlockIoThrottle(priv->mon, device, &reply, supportMaxOptions);
qemuDomainObjExitMonitor(driver, vm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册