<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, May 3, 2016 at 8:00 PM, Peter Krempa <span dir="ltr"><<a href="mailto:pkrempa@redhat.com" target="_blank">pkrempa@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="">On Tue, May 03, 2016 at 14:09:42 +0000, Nishith Shah wrote:<br>
> Use vshCommandOptScaledInt instead of vshCommandOptULongLong so there is<br>
> no need to pass values in raw bytes, which is seldom the case.<br>
<br>
</span>A change like this is incomplete without adding documentation to the<br>
virsh man page (tools/virsh.pod) and in the help strings that document<br>
the individual arguments in the source file.<br></blockquote><div>Sorry about that, this is my first patch and so I am still figuring things out. I will add the details in virsh.pod. Can you elaborate a bit on the help strings in this context?<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class=""><br>
> ---<br>
>  tools/virsh-domain.c | 26 +++++++++++++-------------<br>
>  1 file changed, 13 insertions(+), 13 deletions(-)<br>
><br>
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c<br>
> index 0a6caae..3843675 100644<br>
> --- a/tools/virsh-domain.c<br>
> +++ b/tools/virsh-domain.c<br>
<br>
</span>[...]<br>
<span class=""><br>
> @@ -1353,7 +1353,7 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)<br>
>              goto save_error;<br>
>      }<br>
><br>
> -    if ((rv = vshCommandOptULongLong(ctl, cmd, "total-iops-sec", &value)) < 0) {<br>
> +    if ((rv = vshCommandOptScaledInt(ctl, cmd, "total-iops-sec", &value, 1, ULLONG_MAX)) < 0) {<br>
<br>
</span>iops is a count rather than a byte size so i don't think the default<br>
scaling function is a good fit since:<br>
<br>
kiB -> 1024<br>
KB -> 1000<br>
k -> 1024<br>
</blockquote><div>True, I hadn't thought of that. Should we use a scaling function at all here, since the usual values of iops[1] dont really need to be given in a short format like 1K or 1M?<br><br>[1]: <a href="https://en.wikipedia.org/wiki/IOPS#Examples">https://en.wikipedia.org/wiki/IOPS#Examples</a><br><br></div><div>Regards,<br></div><div>Nishith <br></div></div></div></div>