summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-10-24 15:57:33 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-11-03 11:41:48 +0000
commit345f9e1b04ee18dcb1454dcec49781d5e06ecb60 (patch)
tree91a3f242d6763f9322bb10d2d78d38c75bf1d0f9 /include
parent94054183daffaa41cd77ced9301c01a01027923a (diff)
downloadqemu-345f9e1b04ee18dcb1454dcec49781d5e06ecb60.tar.gz
blockjob: Introduce block_job_complete_sync()
Implement block_job_complete_sync() by doing the exact same thing as block_job_cancel_sync() does, only with calling block_job_complete() instead of block_job_cancel(). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1414159063-25977-5-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/block/blockjob.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index acb399f87d..ab11a0f622 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -273,6 +273,21 @@ bool block_job_is_paused(BlockJob *job);
int block_job_cancel_sync(BlockJob *job);
/**
+ * block_job_complete_sync:
+ * @job: The job to be completed.
+ * @errp: Error object which may be set by block_job_complete(); this is not
+ * necessarily set on every error, the job return value has to be
+ * checked as well.
+ *
+ * Synchronously complete the job. The completion callback is called before the
+ * function returns, unless it is NULL (which is permissible when using this
+ * function).
+ *
+ * Returns the return value from the job.
+ */
+int block_job_complete_sync(BlockJob *job, Error **errp);
+
+/**
* block_job_iostatus_reset:
* @job: The job whose I/O status should be reset.
*