On Mon, Oct 31, 2016 at 05:23:01PM -0400, John Ferlan wrote:
Add in the block I/O throttling group parameter to the command line
if supported. If not supported, fail command creation.

Add the xml2argvtest for testing.

Signed-off-by: John Ferlan <jfer...@redhat.com>
---
src/qemu/qemu_command.c                            | 13 +++++++++
.../qemuxml2argv-blkdeviotune-group-num.args       | 32 ++++++++++++++++++++++
tests/qemuxml2argvtest.c                           |  4 +++
3 files changed, 49 insertions(+)
create mode 100644 
tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-group-num.args

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index b68da3d..cf1512a 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1827,6 +1836,10 @@ qemuBuildDriveStr(virDomainDiskDefPtr disk,
    IOTUNE_ADD(write_iops_sec_max, "iops-write-max");

    IOTUNE_ADD(size_iops_sec, "iops-size");
+    if (disk->blkdeviotune.group_name) {
+        virBufferAsprintf(&opt, ",throttling.group=%s",
+                          disk->blkdeviotune.group_name);

And you need to escape it for the command-line here just in case it has
a comma in it for example.

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to