summaryrefslogtreecommitdiffstats
path: root/include/block/blockjob.h
diff options
context:
space:
mode:
authorKevin Wolf2018-04-25 14:56:09 +0200
committerKevin Wolf2018-05-23 14:30:51 +0200
commit2e1795b58131427719c7cd11f8b9b6984b3f24f8 (patch)
treed9e0c9842af8c71f9aa40c56599c880a88ca7535 /include/block/blockjob.h
parentjob: Add job_is_ready() (diff)
downloadqemu-2e1795b58131427719c7cd11f8b9b6984b3f24f8.tar.gz
qemu-2e1795b58131427719c7cd11f8b9b6984b3f24f8.tar.xz
qemu-2e1795b58131427719c7cd11f8b9b6984b3f24f8.zip
job: Add job_transition_to_ready()
The transition to the READY state was still performed in the BlockJob layer, in the same function that sent the BLOCK_JOB_READY QMP event. This patch brings the state transition to the Job layer and implements the QMP event using a notifier called from the Job layer, like we already do for other events related to state transitions. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/block/blockjob.h')
-rw-r--r--include/block/blockjob.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index 8e1e1ee0de..4fca45f6a1 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -76,6 +76,9 @@ typedef struct BlockJob {
/** Called when the job transitions to PENDING */
Notifier pending_notifier;
+ /** Called when the job transitions to READY */
+ Notifier ready_notifier;
+
/** BlockDriverStates that are involved in this block job */
GSList *nodes;
} BlockJob;