On Wed 01 Mar 2017 12:50:26 PM CET, Stefan Hajnoczi wrote:
> Throttling has a weird property that throttle_get_config() does not
> always return the same throttling settings that were given with
> throttle_config().  In other words, the set and get functions aren't
> symmetric.
>
> If .max is 0 then the throttling code assigns a default value of .avg /
> 10 in throttle_config().  This is an implementation detail of the
> throttling algorithm.  When throttle_get_config() is called the .max
> value returned should still be 0.
>
> Users are exposed to this quirk via "info block" or "query-block"
> monitor commands.  This has caused confusion because it looks like a bug
> when an unexpected value is reported.
>
> This patch hides the .max value adjustment in throttle_get_config() and
> updates test-throttle.c appropriately.
>
> Reported-by: Nini Gu <n...@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>

Reviewed-by: Alberto Garcia <be...@igalia.com>

Berto

Reply via email to