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 /job.c | |
parent | 3fc1ec3725a92268cb896e7fd82b4b4b4718203b (diff) |
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 'job.c')
-rw-r--r-- | job.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -715,6 +715,9 @@ static int job_finalize_single(Job *job) static void job_cancel_async(Job *job, bool force) { + if (job->driver->cancel) { + job->driver->cancel(job); + } if (job->user_paused) { /* Do not call job_enter here, the caller will handle it. */ if (job->driver->user_resume) { |