qemu: monitor: Allow using 'id' instead of 'device' for 'block_set_io_throttle'

The 'device' argument matches only the legacy drive alias. For blockdev
we need to set the throttling for a QOM id and thus we'll need to use
the 'id' field.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa
2018-07-25 15:14:43 +02:00
parent e7e2bbdc94
commit 52096e2338
6 changed files with 21 additions and 11 deletions

View File

@@ -2146,7 +2146,7 @@ testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle(const void *data)
goto cleanup;
if (qemuMonitorJSONSetBlockIoThrottle(qemuMonitorTestGetMonitor(test),
"drive-virtio-disk1", &info, true,
"drive-virtio-disk1", NULL, &info, true,
true, true) < 0)
goto cleanup;