aboutsummaryrefslogtreecommitdiff
path: root/block/mirror.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2018-05-04 12:17:20 +0200
committerKevin Wolf <kwolf@redhat.com>2018-05-23 14:30:51 +0200
commit30a5c887bf4a7e00d0e0ecbb08509e8ba2902620 (patch)
tree1dac007a566de2715e9f73d62a74b98cc45f019e /block/mirror.c
parent2e1795b58131427719c7cd11f8b9b6984b3f24f8 (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/mirror.c')
-rw-r--r--block/mirror.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/mirror.c b/block/mirror.c
index bdc1b5b7b9..dcb66ec3be 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -119,7 +119,7 @@ static void mirror_iteration_done(MirrorOp *op, int ret)
bitmap_set(s->cow_bitmap, chunk_num, nb_chunks);
}
if (!s->initial_zeroing_ongoing) {
- block_job_progress_update(&s->common, op->bytes);
+ job_progress_update(&s->common.job, op->bytes);
}
}
qemu_iovec_destroy(&op->qiov);
@@ -792,7 +792,7 @@ static void coroutine_fn mirror_run(void *opaque)
/* cnt is the number of dirty bytes remaining and s->bytes_in_flight is
* the number of bytes currently being processed; together those are
* the current remaining operation length */
- block_job_progress_set_remaining(&s->common, s->bytes_in_flight + cnt);
+ job_progress_set_remaining(&s->common.job, s->bytes_in_flight + cnt);
/* Note that even when no rate limit is applied we need to yield
* periodically with no pending I/O so that bdrv_drain_all() returns.