On Wed, Oct 25, 2017 at 10:40:47AM +0200, Alberto Garcia wrote:
On Tue 24 Oct 2017 05:33:51 AM CEST, sochin jiang wrote:
> --- a/block/throttle-groups.c
> +++ b/block/throttle-groups.c
> @@ -576,7 +576,9 @@ void throttle_group_unregister_tgm(ThrottleGroupMember
*tgm)
>
> /* remove the current tgm from the list */
> QLIST_REMOVE(tgm, round_robin);
> - throttle_timers_destroy(&tgm->throttle_timers);
> + if (throttle_timers_are_initialized(&tgm->throttle_timers)) {
> + throttle_timers_destroy(&tgm->throttle_timers);
> + }
> qemu_mutex_unlock(&tg->lock);
>
> throttle_group_unref(&tg->ts);
I don't know what the rest of the people think, but I'm not completely
convinced that it's a good idea to have an active ThrottleState inside a
ThrottleGroupMember without timers.
Perhaps in blk_remove_bs() after detaching the AioContext from the BDS
we can attach the default one (what you would get with
blk_get_aio_context()).
On the other hand I think that Manos's series to remove the legacy
throttling code gets rid of BlockBackend.ThrottleGroupMember completely.
What is the status of Manos' series?
It would be good to merge it and then consider currently open throttling
bugs again.