[PATCH RFC 45/51] qemu: blockjob: Add 'concluded' state for a block job

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/qemu/qemu_blockjob.c | 2 +-
 src/qemu/qemu_blockjob.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 24a0efe36f..ee545fc8de 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -45,7 +45,7 @@ VIR_LOG_INIT("qemu.qemu_blockjob");
 /* Note that qemuBlockjobState and qemuBlockjobType values are formatted into
  * the status XML */
 VIR_ENUM_IMPL(qemuBlockjobState, QEMU_BLOCKJOB_STATE_LAST,
-              "completed", "failed", "cancelled", "ready", "new", "running");
+              "completed", "failed", "cancelled", "ready", "new", "running", "concluded");

 VIR_ENUM_IMPL(qemuBlockjob, QEMU_BLOCKJOB_TYPE_LAST,
               "", "pull", "copy", "commit", "active-commit", "");
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index d1e94dc066..c8a6d8cf4c 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -37,6 +37,8 @@ typedef enum {
     QEMU_BLOCKJOB_STATE_READY = VIR_DOMAIN_BLOCK_JOB_READY,
     QEMU_BLOCKJOB_STATE_NEW = VIR_DOMAIN_BLOCK_JOB_LAST,
     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
 } qemuBlockjobState;
 verify((int)QEMU_BLOCKJOB_STATE_NEW == VIR_DOMAIN_BLOCK_JOB_LAST);
-- 
2.19.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux