aboutsummaryrefslogtreecommitdiff
path: root/block/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/stream.c')
-rw-r--r--block/stream.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/block/stream.c b/block/stream.c
index 8369852bda..a1d4768c2e 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -33,7 +33,6 @@ enum {
typedef struct StreamBlockJob {
BlockJob common;
- RateLimit limit;
BlockDriverState *base;
BlockdevOnError on_error;
char *backing_file_str;
@@ -189,7 +188,7 @@ static void coroutine_fn stream_run(void *opaque)
/* Publish progress */
block_job_progress_update(&s->common, n);
if (copy && s->common.speed) {
- delay_ns = ratelimit_calculate_delay(&s->limit, n);
+ delay_ns = ratelimit_calculate_delay(&s->common.limit, n);
} else {
delay_ns = 0;
}
@@ -219,7 +218,7 @@ static void stream_set_speed(BlockJob *job, int64_t speed, Error **errp)
error_setg(errp, QERR_INVALID_PARAMETER, "speed");
return;
}
- ratelimit_set_speed(&s->limit, speed, SLICE_TIME);
+ ratelimit_set_speed(&s->common.limit, speed, SLICE_TIME);
}
static const BlockJobDriver stream_job_driver = {