From: Eric Blake <eblake@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: Gu Nini <ngu@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.7 1/2] throttle: Don't allow burst limits to be lower than the normal limits
Date: Wed, 27 Jul 2016 16:33:51 -0600 [thread overview]
Message-ID: <579936CF.8070606@redhat.com> (raw)
In-Reply-To: <1e88093dfa1e7b1714a1cc94a01713dade46eed8.1469657519.git.berto@igalia.com>
[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]
On 07/27/2016 04:16 PM, Alberto Garcia wrote:
> Setting FOO_max to a value that is lower than FOO does not make
> sense, and it produces odd results depending on the value of
> FOO_max_length. Although the user should not set that configuration
> in the first place it's better to reject it explicitly.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1355665
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> Reported-by: Gu Nini <ngu@redhat.com>
> ---
> util/throttle.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/util/throttle.c b/util/throttle.c
> index 654f95c..7a5c619 100644
> --- a/util/throttle.c
> +++ b/util/throttle.c
> @@ -348,6 +348,12 @@ bool throttle_is_valid(ThrottleConfig *cfg, Error **errp)
> " bps/iops values");
> return false;
> }
> +
> + if (cfg->buckets[i].max && cfg->buckets[i].max < cfg->buckets[i].avg) {
> + error_setg(errp, "if bps_max/iops_max is set it cannot be lower"
> + " than the bps/iops values");
Feels a bit long, I'd be fine with "bps_max/iops_max must not be lower
than bps/iops values". But the idea makes sense.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-07-27 22:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-27 22:16 [Qemu-devel] [PATCH for-2.7 0/2] Don't allow burst limits to be lower than the normal limits Alberto Garcia
2016-07-27 22:16 ` [Qemu-devel] [PATCH for-2.7 1/2] throttle: " Alberto Garcia
2016-07-27 22:33 ` Eric Blake [this message]
2016-07-27 22:45 ` Alberto Garcia
2016-07-27 22:51 ` Eric Blake
2016-07-27 22:16 ` [Qemu-devel] [PATCH for-2.7 2/2] throttle: Test burst limits " Alberto Garcia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=579936CF.8070606@redhat.com \
--to=eblake@redhat.com \
--cc=berto@igalia.com \
--cc=ngu@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.