mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
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>
This commit is contained in:
@ -150,7 +150,7 @@ static void coroutine_fn commit_run(void *opaque)
|
||||
if (len < 0) {
|
||||
goto out;
|
||||
}
|
||||
block_job_progress_set_remaining(&s->common, len);
|
||||
job_progress_set_remaining(&s->common.job, len);
|
||||
|
||||
ret = base_len = blk_getlength(s->base);
|
||||
if (base_len < 0) {
|
||||
@ -196,7 +196,7 @@ static void coroutine_fn commit_run(void *opaque)
|
||||
}
|
||||
}
|
||||
/* 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);
|
||||
|
Reference in New Issue
Block a user