On 07/27/2016 04:45 PM, Alberto Garcia wrote: > On Thu 28 Jul 2016 12:33:51 AM CEST, Eric Blake <ebl...@redhat.com> wrote: >>> + 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. > > That's not strictly true since the default value of bps_max is 0 (unless > 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. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature