[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v2 2/9] qemu: Add news throttle options to the structure _virDomainBlockIoTuneInfo.



When I've add this field I was thinking it would simplify the check of
the capability of read_iops_sec_max and co.
But you're right I can add some arguments in the functions which use
read_iops_sec_max and co.
I will remove this for the "v3" of this patch.

On Fri, Sep 19, 2014 at 1:11 PM, Michal Privoznik <mprivozn redhat com> wrote:
> On 15.09.2014 19:27, Matthias Gatto wrote:
>>
>> Modify the structure _virDomainBlockIoTuneInfo to support
>> total_bytes_sec_max, write_bytes_sec_max,
>> read_bytes_sec_max, total_iops_sec_max, write_iops_sec_max,
>> read_iops_sec_max, size_iops_sec options.
>>
>> Add the boolean support_max_options in the structure
>> _virDomainBlockIoTuneInfo to know
>> if the qemu binary suport the bps_max options and they friends.
>>
>> Change the initialization of the variable expectedInfo in
>> qemumonitorjsontest.c
>> to avoid compiling problem.
>>
>> Signed-off-by: Matthias Gatto <matthias gatto outscale com>
>> ---
>>   src/conf/domain_conf.h      | 8 ++++++++
>>   tests/qemumonitorjsontest.c | 2 +-
>>   2 files changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
>> index ff7d640..5423523 100644
>> --- a/src/conf/domain_conf.h
>> +++ b/src/conf/domain_conf.h
>> @@ -606,6 +606,14 @@ struct _virDomainBlockIoTuneInfo {
>>       unsigned long long total_iops_sec;
>>       unsigned long long read_iops_sec;
>>       unsigned long long write_iops_sec;
>> +    unsigned long long total_bytes_sec_max;
>> +    unsigned long long read_bytes_sec_max;
>> +    unsigned long long write_bytes_sec_max;
>> +    unsigned long long total_iops_sec_max;
>> +    unsigned long long read_iops_sec_max;
>> +    unsigned long long write_iops_sec_max;
>> +    unsigned long long size_iops_sec;
>> +    bool suport_max_options;
>
>
> Spelling is not right: s/suport/support/
>
> Why is the field needed anyway? You're setting it depending on
> virQEMUCapsGet() anyway ...
>
>
>>   };
>>   typedef virDomainBlockIoTuneInfo *virDomainBlockIoTuneInfoPtr;
>>
>> diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c
>> index baee80a..5a2a337 100644
>> --- a/tests/qemumonitorjsontest.c
>> +++ b/tests/qemumonitorjsontest.c
>> @@ -1835,7 +1835,7 @@
>> testQemuMonitorJSONqemuMonitorJSONSetBlockIoThrottle(const void *data)
>>       if (!test)
>>           return -1;
>>
>> -    expectedInfo = (virDomainBlockIoTuneInfo) {1, 2, 3, 4, 5, 6};
>> +    expectedInfo = (virDomainBlockIoTuneInfo) {1, 2, 3, 4, 5, 6, 7, 8, 9,
>> 10, 11, 12, 13, false};
>>
>>       if (qemuMonitorTestAddItem(test, "query-block", queryBlockReply) < 0
>> ||
>>           qemuMonitorTestAddItemParams(test, "block_set_io_throttle",
>>
>
> Michal


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]