From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSXOq-0005Vv-RD for qemu-devel@nongnu.org; Wed, 27 Jul 2016 18:34:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSXOo-0007ba-Mi for qemu-devel@nongnu.org; Wed, 27 Jul 2016 18:33:59 -0400 References: <1e88093dfa1e7b1714a1cc94a01713dade46eed8.1469657519.git.berto@igalia.com> From: Eric Blake Message-ID: <579936CF.8070606@redhat.com> Date: Wed, 27 Jul 2016 16:33:51 -0600 MIME-Version: 1.0 In-Reply-To: <1e88093dfa1e7b1714a1cc94a01713dade46eed8.1469657519.git.berto@igalia.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="d8irVf2VAlJtGbdPF44vlMi9uIFkHGs6G" Subject: Re: [Qemu-devel] [PATCH for-2.7 1/2] throttle: Don't allow burst limits to be lower than the normal limits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Gu Nini , Stefan Hajnoczi , qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --d8irVf2VAlJtGbdPF44vlMi9uIFkHGs6G From: Eric Blake To: Alberto Garcia , qemu-devel@nongnu.org Cc: Gu Nini , Stefan Hajnoczi , qemu-block@nongnu.org Message-ID: <579936CF.8070606@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.7 1/2] throttle: Don't allow burst limits to be lower than the normal limits References: <1e88093dfa1e7b1714a1cc94a01713dade46eed8.1469657519.git.berto@igalia.com> In-Reply-To: <1e88093dfa1e7b1714a1cc94a01713dade46eed8.1469657519.git.berto@igalia.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > https://bugzilla.redhat.com/show_bug.cgi?id=3D1355665 >=20 > Signed-off-by: Alberto Garcia > Reported-by: Gu Nini > --- > util/throttle.c | 6 ++++++ > 1 file changed, 6 insertions(+) >=20 > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --d8irVf2VAlJtGbdPF44vlMi9uIFkHGs6G Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXmTbPAAoJEKeha0olJ0Nqdj4H/295w9tBeE3sQF7MjxTLsjbL dmkXFeD3//GxaCFtvcmIX1tmP5RdOweCkhPCZI++CHLb3jx07Syp5e2ymd38Y7qO RaqJL/5QCQUvrp7/BICkJksWh+iY3/cFNmX7rDL6VHwE1XWJQMxhmHZBWWiExepl w4eW2qC5jqSyT5TdZnUFQuwQHNoS1qeQTZ2MMASxOXmOBzc38iZHe3VyCp2NeHN6 oSc006WppPfUBGXyWz0oAIChi5bw3IxIEIFTFv8p1xps4Q/Pr19+MtPNOmradilf TsTA4ICWIb+8Vgsw+Gm3fXWgOsSuobPa2G96nFMA5Ykog+f3vM2P2fF3oS5zIBo= =/dRQ -----END PGP SIGNATURE----- --d8irVf2VAlJtGbdPF44vlMi9uIFkHGs6G--