|
From: | Alberto Garcia |
Subject: | Re: [Qemu-block] [PATCH v2 2/2] throttle: make throttle_config(throttle_get_config()) symmetric |
Date: | Tue, 28 Feb 2017 13:17:55 +0100 |
User-agent: | Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
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 <address@hidden> Berto
[Prev in Thread] | Current Thread | [Next in Thread] |