"running",
"concluded",
"aborting",
+ "pending",
"pivoting");
VIR_ENUM_IMPL(qemuBlockjob,
if (job->state == QEMU_BLOCKJOB_STATE_NEW ||
job->state == QEMU_BLOCKJOB_STATE_RUNNING)
job->newstate = newstate;
+ } else if (newstate == QEMU_BLOCKJOB_STATE_PENDING) {
+ job->newstate = newstate;
}
/* don't update the job otherwise */
}
job->newstate = -1;
break;
+ case QEMU_BLOCKJOB_STATE_PENDING:
+ /* Similarly as for 'ready' state we should handle it only when
+ * previous state was 'new' or 'running' as there are other cases
+ * when it can be emitted by QEMU. Currently we need this only when
+ * deleting non-active external snapshots. */
+ if (job->state == QEMU_BLOCKJOB_STATE_NEW ||
+ job->state == QEMU_BLOCKJOB_STATE_RUNNING) {
+ job->state = job->newstate;
+ qemuDomainSaveStatus(vm);
+ }
+ job->newstate = -1;
+ break;
+
case QEMU_BLOCKJOB_STATE_NEW:
case QEMU_BLOCKJOB_STATE_RUNNING:
case QEMU_BLOCKJOB_STATE_LAST:
ret = QEMU_BLOCKJOB_STATE_CONCLUDED;
break;
+ case QEMU_MONITOR_JOB_STATUS_PENDING:
+ ret = QEMU_BLOCKJOB_STATE_PENDING;
+ break;
+
case QEMU_MONITOR_JOB_STATUS_UNKNOWN:
case QEMU_MONITOR_JOB_STATUS_CREATED:
case QEMU_MONITOR_JOB_STATUS_RUNNING:
case QEMU_MONITOR_JOB_STATUS_PAUSED:
case QEMU_MONITOR_JOB_STATUS_STANDBY:
case QEMU_MONITOR_JOB_STATUS_WAITING:
- case QEMU_MONITOR_JOB_STATUS_PENDING:
case QEMU_MONITOR_JOB_STATUS_ABORTING:
case QEMU_MONITOR_JOB_STATUS_UNDEFINED:
case QEMU_MONITOR_JOB_STATUS_NULL:
QEMU_BLOCKJOB_STATE_CONCLUDED, /* job has finished, but it's unknown
whether it has failed or not */
QEMU_BLOCKJOB_STATE_ABORTING,
+ QEMU_BLOCKJOB_STATE_PENDING,
QEMU_BLOCKJOB_STATE_PIVOTING,
QEMU_BLOCKJOB_STATE_LAST
} qemuBlockjobState;