diff options
author | John Snow <jsnow@redhat.com> | 2016-11-08 01:50:37 -0500 |
---|---|---|
committer | Jeff Cody <jcody@redhat.com> | 2016-11-14 22:47:34 -0500 |
commit | 5ccac6f186e4a480074880d958760c7105cf9ba8 (patch) | |
tree | 7f5f66df425b35ad18683743788ad575032cbeea /block/stream.c | |
parent | a7815a764c40c9dcf204f666c2d90248095376a8 (diff) |
blockjob: add block_job_start
Instead of automatically starting jobs at creation time via backup_start
et al, we'd like to return a job object pointer that can be started
manually at later point in time.
For now, add the block_job_start mechanism and start the jobs
automatically as we have been doing, with conversions job-by-job coming
in later patches.
Of note: cancellation of unstarted jobs will perform all the normal
cleanup as if the job had started, particularly abort and clean. The
only difference is that we will not emit any events, because the job
never actually started.
Signed-off-by: John Snow <jsnow@redhat.com>
Message-id: 1478587839-9834-5-git-send-email-jsnow@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'block/stream.c')
-rw-r--r-- | block/stream.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/block/stream.c b/block/stream.c index 92309ffc2e..1523ba7dfb 100644 --- a/block/stream.c +++ b/block/stream.c @@ -255,7 +255,6 @@ void stream_start(const char *job_id, BlockDriverState *bs, s->bs_flags = orig_bs_flags; s->on_error = on_error; - s->common.co = qemu_coroutine_create(s->common.driver->start, s); - trace_stream_start(bs, base, s, s->common.co); - qemu_coroutine_enter(s->common.co); + trace_stream_start(bs, base, s); + block_job_start(&s->common); } |