Pull request
This fix prevents hangs when a drive leaves a throttling group. -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJbUKAVAAoJEJykq7OBq3PIrTwH+wUjn5FCz1DFeGtEGof/CzMN vzGC+LPm1zcvgHf62afeCwYPAJbAYpX4xj4uqF4RT87QBXgb737d6y7JW+4eH6DA Ibf6aC9H/0KtMl5x3MYWGkXAe5RedY+01Yiy8idWHs3/AkZ0K18AvOUn7RMNFH1a wogHpqpb6nRSpetHuWi650TJCoy+tKAESLFxJ478sWcSM2eTHWMen9tFFCtq9ptR eF4z8Tz4zWsYJTMorIbe1V6Qe89IEKtLPDWspvX83uUNzMjicr4SlLpI5KgDxfco BarpwDxPG71hHzQqqbmoDmZzUdkl4mlTtl8QAepgJpw/bs6JCabL22RWL7evz0k= =Pi5y -----END PGP SIGNATURE----- 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>
This commit is contained in:
commit
e1ea55668f
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user