提交 39a427e8 编写于 作者: S Stefan Hajnoczi 提交者: Cole Robinson

qemu: Keep QEMU host drive prefix in BlkIoTune

The QEMU -drive id= begins with libvirt's QEMU host drive prefix
("drive-"), which is stripped off in several places two convert between
host ("-drive") and guest ("-device") device names.

In the case of BlkIoTune it is unnecessary to strip the QEMU host drive
prefix because we operate on "info block"/"query-block" output that uses
host drive names.

Stripping the prefix incorrectly caused string comparisons to fail since
we were comparing the guest device name against the host device name.
Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
(cherry picked from commit 04ee70bf)
上级 ca1cebdb
......@@ -242,6 +242,7 @@ Patches have also been contributed by:
Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com>
Wido den Hollander <wido@widodh.nl>
Gene Czarcinski <gene@czarc.net>
Stefan Hajnoczi <stefanha@redhat.com>
[....send patches to get your name here....]
......
......@@ -3518,9 +3518,6 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValuePtr result,
goto cleanup;
}
if(STRPREFIX(current_dev, QEMU_DRIVE_HOST_PREFIX))
current_dev += strlen(QEMU_DRIVE_HOST_PREFIX);
if (STREQ(current_dev, device))
continue;
......
......@@ -3367,9 +3367,6 @@ qemuMonitorTextParseBlockIoThrottle(const char *result,
p = result;
while (*p) {
if (STRPREFIX(p, QEMU_DRIVE_HOST_PREFIX))
p += strlen(QEMU_DRIVE_HOST_PREFIX);
if (STREQLEN(p, device, devnamelen) &&
p[devnamelen] == ':' && p[devnamelen+1] == ' ') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册