aboutsummaryrefslogtreecommitdiff
path: root/block/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/io.c')
-rw-r--r--block/io.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/block/io.c b/block/io.c
index 691baa69e7..9201b89c35 100644
--- a/block/io.c
+++ b/block/io.c
@@ -62,28 +62,15 @@ static int coroutine_fn bdrv_co_do_write_zeroes(BlockDriverState *bs,
void bdrv_set_io_limits(BlockDriverState *bs,
ThrottleConfig *cfg)
{
- int i;
-
throttle_group_config(bs, cfg);
-
- for (i = 0; i < 2; i++) {
- qemu_co_enter_next(&bs->throttled_reqs[i]);
- }
}
static void bdrv_start_throttled_reqs(BlockDriverState *bs)
{
bool enabled = bs->io_limits_enabled;
- int i;
bs->io_limits_enabled = false;
-
- for (i = 0; i < 2; i++) {
- while (qemu_co_enter_next(&bs->throttled_reqs[i])) {
- ;
- }
- }
-
+ throttle_group_restart_bs(bs);
bs->io_limits_enabled = enabled;
}