aboutsummaryrefslogtreecommitdiff
path: root/block/throttle-groups.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2016-04-07 18:33:33 +0200
committerKevin Wolf <kwolf@redhat.com>2016-05-12 15:22:07 +0200
commitce0f141259f06fd77fde2519cc352618ad797ce2 (patch)
tree204c5d21527ea538dddc7cdda5c239cf6a08c5e9 /block/throttle-groups.c
parentb6e84c97ed0d786a7cda4e184736e25bb8824c2c (diff)
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 <berto@igalia.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/throttle-groups.c')
-rw-r--r--block/throttle-groups.c4
1 files changed, 4 insertions, 0 deletions
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;