diff options
author | John Snow | 2016-11-08 07:50:36 +0100 |
---|---|---|
committer | Jeff Cody | 2016-11-15 04:47:34 +0100 |
commit | a7815a764c40c9dcf204f666c2d90248095376a8 (patch) | |
tree | 6218069fef5d588f66950b1fd11cbfa87b043aca /include/block/blockjob_int.h | |
parent | blockjob: add .clean property (diff) | |
download | qemu-a7815a764c40c9dcf204f666c2d90248095376a8.tar.gz qemu-a7815a764c40c9dcf204f666c2d90248095376a8.tar.xz qemu-a7815a764c40c9dcf204f666c2d90248095376a8.zip |
blockjob: add .start field
Add an explicit start field to specify the entrypoint. We already have
ownership of the coroutine itself AND managing the lifetime of the
coroutine, let's take control of creation of the coroutine, too.
This will allow us to delay creation of the actual coroutine until we
know we'll actually start a BlockJob in block_job_start. This avoids
the sticky question of how to "un-create" a Coroutine that hasn't been
started yet.
Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-id: 1478587839-9834-4-git-send-email-jsnow@redhat.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'include/block/blockjob_int.h')
-rw-r--r-- | include/block/blockjob_int.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index 60d91a0678..82238229c6 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -47,6 +47,9 @@ struct BlockJobDriver { /** Optional callback for job types that need to forward I/O status reset */ void (*iostatus_reset)(BlockJob *job); + /** Mandatory: Entrypoint for the Coroutine. */ + CoroutineEntry *start; + /** * Optional callback for job types whose completion must be triggered * manually. |