[libvirt] [RFC PATCHv2 2/8] threshold: expose new API in virsh
Eric Blake
eblake at redhat.com
Mon Jun 15 16:35:46 UTC 2015
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 at redhat.com>
>> ---
>> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150615/8aeea511/attachment-0001.sig>
More information about the libvir-list
mailing list