From ce0f141259f06fd77fde2519cc352618ad797ce2 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 7 Apr 2016 18:33:33 +0200 Subject: block: introduce bdrv_no_throttling_begin/end Extract the handling of throttling from bdrv_flush_io_queue. These new functions will soon become BdrvChildRole callbacks, as they can be generalized to "beginning of drain" and "end of drain". Reviewed-by: Alberto Garcia Signed-off-by: Paolo Bonzini Acked-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/throttle-groups.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'block/throttle-groups.c') diff --git a/block/throttle-groups.c b/block/throttle-groups.c index b796f6b9fa..9ac063a0cd 100644 --- a/block/throttle-groups.c +++ b/block/throttle-groups.c @@ -219,6 +219,10 @@ static bool throttle_group_schedule_timer(BlockDriverState *bs, ThrottleGroup *tg = container_of(ts, ThrottleGroup, ts); bool must_wait; + if (bs->io_limits_disabled) { + return false; + } + /* Check if any of the timers in this group is already armed */ if (tg->any_timer_armed[is_write]) { return true; -- cgit v1.2.1