On Tue 28 Feb 2017 12:19:35 PM CET, Stefan Hajnoczi wrote:
> +/* undo internal bucket parameter changes (see throttle_fix_bucket()) */
> +static void throttle_unfix_bucket(LeakyBucket *bkt)
> +{
> +    double min = bkt->avg / 10;
> +
> +    if (bkt->max == min) {
> +        bkt->max = 0;
> +    }
> +}

I guess you could do the more general if (bkt->max < bkt->avg), but your
solution is also fine with me.

Reviewed-by: Alberto Garcia <[email protected]>

Berto

Reply via email to