]> git.ipfire.org Git - thirdparty/qemu.git/commit
throttle: Correct access to wrong BlockBackendPublic structures
authorAlberto Garcia <berto@igalia.com>
Mon, 17 Oct 2016 15:46:02 +0000 (18:46 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 2 Nov 2016 23:19:00 +0000 (18:19 -0500)
commitb1fdc9419322247fd7faaa8e795fa80176825459
tree4cf4b87dc73a3785a586309d2b69585e3bf44d99
parent61781984dbadc2ed7af51e1f818a7d8beec2ec7b
throttle: Correct access to wrong BlockBackendPublic structures

In 27ccdd52598290f0f8b58be56e235aff7aebfaf3 the throttling fields were
moved from BlockDriverState to BlockBackend. However in a few cases
the code started using throttling fields from the active BlockBackend
instead of the round-robin token, making the algorithm behave
incorrectly.

This can cause starvation if there's a throttling group with several
drives but only one of them has I/O.

Cc: qemu-stable@nongnu.org
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alberto Garcia <berto@igalia.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 6bf77e1c2dc24da1bade16e8a9a637f3b127314d)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/throttle-groups.c