[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v2] throttle: fix a qemu crash problem when call
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [PATCH v2] throttle: fix a qemu crash problem when calling blk_delete |
Date: |
Wed, 25 Oct 2017 10:40:47 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
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.
Berto