diff options
| author | Peter Maydell | 2018-07-19 16:38:06 +0200 |
|---|---|---|
| committer | Peter Maydell | 2018-07-19 16:38:06 +0200 |
| commit | e1ea55668ffe6ce558a063f3a9621b761738e1f2 (patch) | |
| tree | 818872f66e25eb93118adbc79f7c3137173a2478 | |
| parent | Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180719' into staging (diff) | |
| parent | throttle-groups: fix hang when group member leaves (diff) | |
| download | qemu-e1ea55668ffe6ce558a063f3a9621b761738e1f2.tar.gz qemu-e1ea55668ffe6ce558a063f3a9621b761738e1f2.tar.xz qemu-e1ea55668ffe6ce558a063f3a9621b761738e1f2.zip | |
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Pull request
This fix prevents hangs when a drive leaves a throttling group.
# gpg: Signature made Thu 19 Jul 2018 15:28:37 BST
# gpg: using RSA key 9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>"
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha/tags/block-pull-request:
throttle-groups: fix hang when group member leaves
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| -rw-r--r-- | block/throttle-groups.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/throttle-groups.c b/block/throttle-groups.c index 36cc0430c3..e297b04e17 100644 --- a/block/throttle-groups.c +++ b/block/throttle-groups.c @@ -564,6 +564,10 @@ void throttle_group_unregister_tgm(ThrottleGroupMember *tgm) qemu_mutex_lock(&tg->lock); for (i = 0; i < 2; i++) { + if (timer_pending(tgm->throttle_timers.timers[i])) { + tg->any_timer_armed[i] = false; + schedule_next_request(tgm, i); + } if (tg->tokens[i] == tgm) { token = throttle_group_next_tgm(tgm); /* Take care of the case where this is the last tgm in the group */ |
