diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-02-05 19:37:14 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2021-02-12 11:23:19 -0600 |
commit | 9820933b57b24c21a509680650f669123651b60d (patch) | |
tree | 880a422fa859d5566eccd39103ec93f515cf6c76 /include/qemu | |
parent | 3fc1ec3725a92268cb896e7fd82b4b4b4718203b (diff) | |
download | qemu-9820933b57b24c21a509680650f669123651b60d.zip qemu-9820933b57b24c21a509680650f669123651b60d.tar.gz qemu-9820933b57b24c21a509680650f669123651b60d.tar.bz2 |
job: add .cancel handler for the driver
To be used in mirror in the following commit to cancel in-flight io on
target to not waste the time.
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20210205163720.887197-5-vsementsov@virtuozzo.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/job.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/qemu/job.h b/include/qemu/job.h index 32aabb1..efc6fa7 100644 --- a/include/qemu/job.h +++ b/include/qemu/job.h @@ -251,6 +251,11 @@ struct JobDriver { */ void (*clean)(Job *job); + /** + * If the callback is not NULL, it will be invoked in job_cancel_async + */ + void (*cancel)(Job *job); + /** Called when the job is freed */ void (*free)(Job *job); |