On Tue, Nov 08, 2016 at 01:50:37AM -0500, John Snow wrote:
> 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 <[email protected]>
> ---
> block/backup.c | 3 +--
> block/commit.c | 5 ++---
> block/mirror.c | 5 ++---
> block/stream.c | 5 ++---
> block/trace-events | 6 +++---
> blockjob.c | 54
> ++++++++++++++++++++++++++++++++++++-----------
> include/block/blockjob.h | 9 ++++++++
> tests/test-blockjob-txn.c | 12 +++++------
> 8 files changed, 67 insertions(+), 32 deletions(-)
>
Reviewed-by: Jeff Cody <[email protected]>