aboutsummaryrefslogtreecommitdiff
path: root/block/throttle-groups.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2016-03-21 13:30:30 +0100
committerKevin Wolf <kwolf@redhat.com>2016-05-19 16:45:30 +0200
commit441565b2792d4ee9ee1928a8d14538be39211292 (patch)
tree1d705206c19f29bba69bf5467c73ca339d3e62b1 /block/throttle-groups.c
parent27ccdd52598290f0f8b58be56e235aff7aebfaf3 (diff)
downloadqemu-441565b2792d4ee9ee1928a8d14538be39211292.zip
qemu-441565b2792d4ee9ee1928a8d14538be39211292.tar.gz
qemu-441565b2792d4ee9ee1928a8d14538be39211292.tar.bz2
block: Move actual I/O throttling to BlockBackend
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/throttle-groups.c')
-rw-r--r--block/throttle-groups.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/block/throttle-groups.c b/block/throttle-groups.c
index 56dc311..3db8cf7 100644
--- a/block/throttle-groups.c
+++ b/block/throttle-groups.c
@@ -284,18 +284,17 @@ static void schedule_next_request(BlockBackend *blk, bool is_write)
* if necessary, and schedule the next request using a round robin
* algorithm.
*
- * @bs: the current BlockDriverState
+ * @blk: the current BlockBackend
* @bytes: the number of bytes for this I/O
* @is_write: the type of operation (read/write)
*/
-void coroutine_fn throttle_group_co_io_limits_intercept(BlockDriverState *bs,
+void coroutine_fn throttle_group_co_io_limits_intercept(BlockBackend *blk,
unsigned int bytes,
bool is_write)
{
bool must_wait;
BlockBackend *token;
- BlockBackend *blk = bs->blk;
BlockBackendPublic *blkp = blk_get_public(blk);
ThrottleGroup *tg = container_of(blkp->throttle_state, ThrottleGroup, ts);
qemu_mutex_lock(&tg->lock);