Message ID | 20180410153748.22505-7-kwolf@redhat.com |
---|---|
State | New |
Headers | show |
Series | [PULL,1/7] iotests.py: support unsupported_fmts in main() | expand |
diff --git a/block/commit.c b/block/commit.c index ab4fa3c3cf..1432baeef4 100644 --- a/block/commit.c +++ b/block/commit.c @@ -202,6 +202,8 @@ static void coroutine_fn commit_run(void *opaque) if (copy && s->common.speed) { delay_ns = ratelimit_calculate_delay(&s->limit, n); + } else { + delay_ns = 0; } } diff --git a/block/stream.c b/block/stream.c index f3b53f49e2..1a85708fcf 100644 --- a/block/stream.c +++ b/block/stream.c @@ -188,6 +188,8 @@ static void coroutine_fn stream_run(void *opaque) s->common.offset += n; if (copy && s->common.speed) { delay_ns = ratelimit_calculate_delay(&s->limit, n); + } else { + delay_ns = 0; } }