diff options
author | Max Reitz <mreitz@redhat.com> | 2021-04-09 14:04:20 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2021-04-09 18:00:29 +0200 |
commit | 53ddb9c892f048bd031568178da52e4964d7d30a (patch) | |
tree | 86a02b26364a314b03f8751d3d9d39a5e43d7ebb /job.c | |
parent | 00769414cd1044b823b65e66586e93bb79494441 (diff) |
job: Allow complete for jobs on standby
The only job that implements .complete is the mirror job, and it can
handle completion requests just fine while the job is paused.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1945635
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20210409120422.144040-4-mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'job.c')
-rw-r--r-- | job.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -56,7 +56,7 @@ bool JobVerbTable[JOB_VERB__MAX][JOB_STATUS__MAX] = { [JOB_VERB_PAUSE] = {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}, [JOB_VERB_RESUME] = {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}, [JOB_VERB_SET_SPEED] = {0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0}, - [JOB_VERB_COMPLETE] = {0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, + [JOB_VERB_COMPLETE] = {0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0}, [JOB_VERB_FINALIZE] = {0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0}, [JOB_VERB_DISMISS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0}, }; @@ -991,7 +991,7 @@ void job_complete(Job *job, Error **errp) if (job_apply_verb(job, JOB_VERB_COMPLETE, errp)) { return; } - if (job->pause_count || job_is_cancelled(job) || !job->driver->complete) { + if (job_is_cancelled(job) || !job->driver->complete) { error_setg(errp, "The active block job '%s' cannot be completed", job->id); return; |