diff options
| author | Kevin Wolf <kwolf@redhat.com> | 2018-08-17 17:29:08 +0200 |
|---|---|---|
| committer | Kevin Wolf <kwolf@redhat.com> | 2018-09-25 15:50:15 +0200 |
| commit | 30c070a547322a5e41ce129d540bca3653b1a9c8 (patch) | |
| tree | b23c83d6c288b8c8cf1c15d6bf2c81f10518aa4b /include/qemu/job.h | |
| parent | f62c172959cd2b6de4dd8ba782e855d64d94764b (diff) | |
| download | focaccia-qemu-30c070a547322a5e41ce129d540bca3653b1a9c8.tar.gz focaccia-qemu-30c070a547322a5e41ce129d540bca3653b1a9c8.zip | |
test-blockjob: Acquire AioContext around job_cancel_sync()
All callers in QEMU proper hold the AioContext lock when calling job_finish_sync(). test-blockjob should do the same when it calls the function indirectly through job_cancel_sync(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'include/qemu/job.h')
| -rw-r--r-- | include/qemu/job.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/qemu/job.h b/include/qemu/job.h index b4a784d3cc..63c60ef1ba 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -524,6 +524,8 @@ void job_user_cancel(Job *job, bool force, Error **errp); * * Returns the return value from the job if the job actually completed * during the call, or -ECANCELED if it was canceled. + * + * Callers must hold the AioContext lock of job->aio_context. */ int job_cancel_sync(Job *job); @@ -541,6 +543,8 @@ void job_cancel_sync_all(void); * function). * * Returns the return value from the job. + * + * Callers must hold the AioContext lock of job->aio_context. */ int job_complete_sync(Job *job, Error **errp); @@ -566,6 +570,8 @@ void job_dismiss(Job **job, Error **errp); * * Returns 0 if the job is successfully completed, -ECANCELED if the job was * cancelled before completing, and -errno in other error cases. + * + * Callers must hold the AioContext lock of job->aio_context. */ int job_finish_sync(Job *job, void (*finish)(Job *, Error **errp), Error **errp); |