From 9820933b57b24c21a509680650f669123651b60d Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Fri, 5 Feb 2021 19:37:14 +0300 Subject: 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 Message-Id: <20210205163720.887197-5-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake Signed-off-by: Eric Blake --- include/qemu/job.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/qemu/job.h') diff --git a/include/qemu/job.h b/include/qemu/job.h index 32aabb1c60..efc6fa7544 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); -- cgit v1.2.3