Re: [libvirt] [PATCH 1/2] qemu: Fix copy_paste_error in qemuBuildDriveStr.

2014-11-12 Thread John Ferlan


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 
>> ---
>>  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:

  
5000
6000
1
6000
  

and the other with

  
5000
5000
3500
3500
5000
5000
3500
3500
2000
  


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=1,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@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [PATCH 1/2] qemu: Fix copy_paste_error in qemuBuildDriveStr.

2014-11-12 Thread Ján Tomko
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 
> ---
>  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.

Jan



signature.asc
Description: OpenPGP digital signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 1/2] qemu: Fix copy_paste_error in qemuBuildDriveStr.

2014-11-12 Thread John Ferlan


On 11/12/2014 08:04 AM, Matthias Gatto wrote:
> Fix for this: 
> http://www.redhat.com/archives/libvir-list/2014-November/msg00324.html
> 
> Signed-off-by: Matthias Gatto 
> ---
>  src/qemu/qemu_command.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

ACK

John

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


[libvirt] [PATCH 1/2] qemu: Fix copy_paste_error in qemuBuildDriveStr.

2014-11-12 Thread Matthias Gatto
Fix for this: 
http://www.redhat.com/archives/libvir-list/2014-November/msg00324.html

Signed-off-by: Matthias Gatto 
---
 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);
 }
-- 
1.8.3.1

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