diff options
author | Kevin Wolf <kwolf@redhat.com> | 2018-05-04 12:17:20 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2018-05-23 14:30:51 +0200 |
commit | 30a5c887bf4a7e00d0e0ecbb08509e8ba2902620 (patch) | |
tree | 1dac007a566de2715e9f73d62a74b98cc45f019e /block/stream.c | |
parent | 2e1795b58131427719c7cd11f8b9b6984b3f24f8 (diff) |
job: Move progress fields to Job
BlockJob has fields .offset and .len, which are actually misnomers today
because they are no longer tied to block device sizes, but just progress
counters. As such they make a lot of sense in generic Jobs.
This patch moves the fields to Job and renames them to .progress_current
and .progress_total to describe their function better.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/stream.c')
-rw-r--r-- | block/stream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/stream.c b/block/stream.c index 8546c412cd..a5d6e0cf8a 100644 --- a/block/stream.c +++ b/block/stream.c @@ -121,7 +121,7 @@ static void coroutine_fn stream_run(void *opaque) ret = len; goto out; } - block_job_progress_set_remaining(&s->common, len); + job_progress_set_remaining(&s->common.job, len); buf = qemu_blockalign(bs, STREAM_BUFFER_SIZE); @@ -184,7 +184,7 @@ static void coroutine_fn stream_run(void *opaque) ret = 0; /* Publish progress */ - block_job_progress_update(&s->common, n); + job_progress_update(&s->common.job, n); if (copy) { delay_ns = block_job_ratelimit_get_delay(&s->common, n); } else { |