On 11/12/2014 07:18 AM, Ján Tomko wrote: > On 11/12/2014 02:04 PM, Matthias Gatto wrote: >> Fix for this: http://www.redhat.com/archives/libvir-list/2014-November/msg00324.html >> >> Signed-off-by: Matthias Gatto <matthias.gatto@xxxxxxxxxxxx> >> --- >> src/qemu/qemu_command.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c >> index a5ed8ed..f674ba9 100644 >> --- a/src/qemu/qemu_command.c >> +++ b/src/qemu/qemu_command.c >> @@ -3762,7 +3762,7 @@ qemuBuildDriveStr(virConnectPtr conn, >> disk->blkdeviotune.write_iops_sec_max); >> } >> >> - if (disk->blkdeviotune.write_iops_sec_max) { >> + if (disk->blkdeviotune.size_iops_sec) { >> virBufferAsprintf(&opt, ",iops_size=%llu", >> disk->blkdeviotune.size_iops_sec); >> } >> > > It would be nice to have this tested in qemuxml2argvtest. > You mean something like: diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index fe58a24..c52b647 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1265,6 +1265,9 @@ mymain(void) DO_TEST("numad-static-memory-auto-vcpu", NONE); DO_TEST("blkdeviotune", QEMU_CAPS_NAME, QEMU_CAPS_DEVICE, QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_IOTUNE); + DO_TEST("blkdeviotune-max", QEMU_CAPS_NAME, QEMU_CAPS_DEVICE, + QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_IOTUNE, + QEMU_CAPS_DRIVE_IOTUNE_MAX); DO_TEST("multifunction-pci-device", QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE, QEMU_CAPS_NODEFCONFIG, Plus of course the obligatory .xml and .args files... Note that at most only 9 parameters can be given because there is XML config failure if any of the "total_" values are provided with any of their corresponding "read_"/"write_" values. My test file has one disk with: <iotune> <total_bytes_sec>5000</total_bytes_sec> <total_iops_sec>6000</total_iops_sec> <total_bytes_sec_max>10000</total_bytes_sec_max> <total_iops_sec_max>6000</total_iops_sec_max> </iotune> and the other with <iotune> <read_bytes_sec>5000</read_bytes_sec> <write_bytes_sec>5000</write_bytes_sec> <read_iops_sec>3500</read_iops_sec> <write_iops_sec>3500</write_iops_sec> <read_bytes_sec_max>5000</read_bytes_sec_max> <write_bytes_sec_max>5000</write_bytes_sec_max> <read_iops_sec_max>3500</read_iops_sec_max> <write_iops_sec_max>3500</write_iops_sec_max> <size_iops_sec_max>2000</size_iops_sec_max> </iotune> where the .args file has: ... -drive file=/dev/HostVG/QEMUGuest1,if=none,id=drive-ide0-0-0,cache=off,\ bps=5000,iops=6000,bps_max=10000,iops_max=6000 -device \ ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \ -drive file=/dev/HostVG/QEMUGuest2,if=none,id=drive-ide0-0-1,cache=off,\ bps_rd=5000,bps_wr=5000,iops_rd=3500,iops_wr=3500,bps_rd_max=5000,\ bps_wr_max=5000,iops_rd_max=3500,iops_wr_max=3500 \ ... Testing without the QEMU_CAPS_DRIVE_IOTUNE_MAX results in: 333) QEMU XML-2-ARGV blkdeviotune-max ... libvirt: QEMU Driver error : unsupported configuration: there is some block I/O throttling paramater that are not supported with this QEMU binary(need QEMU 1.7 or superior) FAILED NOTE: Parameter is spelled wrong... and the message doesn't read well, something I can fix. John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list