Re: [RFC PATCHv2 2/8] threshold: expose new API in virsh

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

 



On 06/15/2015 07:29 AM, Peter Krempa wrote:
> On Fri, Jun 12, 2015 at 13:29:26 -0600, Eric Blake wrote:
>> Add a new 'virsh domblkthreshold' command to use the new API.
>>
>> * tools/virsh.pod (domblkthreshold): Document it.
>> * tools/virsh-domain-monitor.c (cmdDomblkthreshold): New function.
>> (domMonitoringCmds): Register it.
>>
>> Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
>> ---
>>  tools/virsh-domain-monitor.c | 81 ++++++++++++++++++++++++++++++++++++++++++++
>>  tools/virsh.pod              | 24 +++++++++++++
>>  2 files changed, 105 insertions(+)
>>

>> +    {.name = "percentage",
> 
> I'd rather use "proportional" or something else that does not hint to
> parts per hundred.

Good idea.  It also means I need to tweak the flag name in patch 1.

I also wonder if I should teach virsh to allow '--percentage 72.5'
(meaning 72.5%) in addition to '--proportion 725000' (if we switch to
parts-per-million)?  Floating point parameter parsing in virsh could be
interesting...


>> +    if (percentage)
>> +        flags |= VIR_DOMAIN_BLOCK_SET_WRITE_THRESHOLD_PERCENTAGE;
> 
> As well as here.

Ah, so you caught the same naming conundrum as I mentioned above :)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]