From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSXfX-0003H3-5G for qemu-devel@nongnu.org; Wed, 27 Jul 2016 18:51:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSXfV-0003Yc-4b for qemu-devel@nongnu.org; Wed, 27 Jul 2016 18:51:14 -0400 References: <1e88093dfa1e7b1714a1cc94a01713dade46eed8.1469657519.git.berto@igalia.com> <579936CF.8070606@redhat.com> From: Eric Blake Message-ID: <57993AD7.6050501@redhat.com> Date: Wed, 27 Jul 2016 16:51:03 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IHs7K696V4Mp2BnDSuOnQs6r9SwIkFECA" 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) --IHs7K696V4Mp2BnDSuOnQs6r9SwIkFECA From: Eric Blake To: Alberto Garcia , qemu-devel@nongnu.org Cc: Gu Nini , Stefan Hajnoczi , qemu-block@nongnu.org Message-ID: <57993AD7.6050501@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> <579936CF.8070606@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/27/2016 04:45 PM, Alberto Garcia wrote: > On Thu 28 Jul 2016 12:33:51 AM CEST, Eric Blake wro= te: >>> + if (cfg->buckets[i].max && cfg->buckets[i].max < cfg->bucket= s[i].avg) { >>> + error_setg(errp, "if bps_max/iops_max is set it cannot b= e 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 > That's not strictly true since the default value of bps_max is 0 (unles= s > we forbid setting it explicitly to 0 as well). The message can only be emitted if bps_max was set. If bps_max is its default value of 0 (or even if the user explicitly set it to zero), then this message won't appear. Therefore, telling the user that "if this is set" is redundant, because the error is only issued when it IS set. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --IHs7K696V4Mp2BnDSuOnQs6r9SwIkFECA 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/ iQEcBAEBCAAGBQJXmTrXAAoJEKeha0olJ0Nq7YMH/iU9scBTN4fu8/w816igCckM P4IlHne7Zm1Qz52g47K/ohXil/yYwOYQyTuZDUttOgEg0dGhJCQej9z+/WcN325K jnq2Iz0XKmsG8m33Uw4CCFNvhoIFX5aXa8AFJ7hWccKcnvl7SFAoHVcJrRxjTIOL 5YpqvRagN0qBdFibbtvi8H6BvdWBxtEAfrWFs3IqpfPs1PwAefviCeDT80YixTes jQt+N5yvdAvbYn8DrfPpnCa/uLzygr+qQbJ2ayhg+4F6i71cFwA6WKJac8k4Dasb O+Nm7dx4V7CkwwPYEb1yWOj9n9WVmjlo+9wFil+QRZIu8HfXa4mxlX6n9pnhuyw= =hSXn -----END PGP SIGNATURE----- --IHs7K696V4Mp2BnDSuOnQs6r9SwIkFECA--