qemu: blockjob: Add 'concluded' state for a block job

This new state is entered when qemu finished the job but libvirt does
not know whether it was successful or not.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2018-12-07 17:40:30 +01:00
parent 2d36c5866e
commit e55d64818d
2 changed files with 4 additions and 1 deletions

View File

@ -52,7 +52,8 @@ VIR_ENUM_IMPL(qemuBlockjobState,
"cancelled", "cancelled",
"ready", "ready",
"new", "new",
"running"); "running",
"concluded");
VIR_ENUM_IMPL(qemuBlockjob, VIR_ENUM_IMPL(qemuBlockjob,
QEMU_BLOCKJOB_TYPE_LAST, QEMU_BLOCKJOB_TYPE_LAST,

View File

@ -38,6 +38,8 @@ typedef enum {
/* Additional enum values local to qemu */ /* Additional enum values local to qemu */
QEMU_BLOCKJOB_STATE_NEW, QEMU_BLOCKJOB_STATE_NEW,
QEMU_BLOCKJOB_STATE_RUNNING, QEMU_BLOCKJOB_STATE_RUNNING,
QEMU_BLOCKJOB_STATE_CONCLUDED, /* job has finished, but it's unknown
whether it has failed or not */
QEMU_BLOCKJOB_STATE_LAST QEMU_BLOCKJOB_STATE_LAST
} qemuBlockjobState; } qemuBlockjobState;
verify((int)QEMU_BLOCKJOB_STATE_NEW == VIR_DOMAIN_BLOCK_JOB_LAST); verify((int)QEMU_BLOCKJOB_STATE_NEW == VIR_DOMAIN_BLOCK_JOB_LAST);