[PATCH 7/9] qemu: Add enum entries for 'snapshot-load' qemu job

Peter Krempa posted 9 patches 6 days, 4 hours ago
[PATCH 7/9] qemu: Add enum entries for 'snapshot-load' qemu job
Posted by Peter Krempa 6 days, 4 hours ago
The internal snapshot code will use the 'snapshot-load' command so we
need to add the corresponding job type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_block.c    | 1 +
 src/qemu/qemu_blockjob.c | 2 ++
 src/qemu/qemu_blockjob.h | 1 +
 src/qemu/qemu_domain.c   | 2 ++
 4 files changed, 6 insertions(+)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index 692b4d350e..3c1305ec84 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -3777,6 +3777,7 @@ qemuBlockPivot(virDomainObj *vm,
     case QEMU_BLOCKJOB_TYPE_CREATE:
     case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
     case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
+    case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD:
     case QEMU_BLOCKJOB_TYPE_BROKEN:
         virReportError(VIR_ERR_OPERATION_INVALID,
                        _("job type '%1$s' does not support pivot"),
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 6e53603fba..c35321790e 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -70,6 +70,7 @@ VIR_ENUM_IMPL(qemuBlockjob,
               "create",
               "snapshot-save",
               "snapshot-delete",
+              "snapshot-load",
               "broken");

 static virClass *qemuBlockJobDataClass;
@@ -1459,6 +1460,7 @@ qemuBlockJobEventProcessConcludedTransition(qemuBlockJobData *job,

     case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
     case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
+    case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD:
         /* The internal snapshot jobs don't need any extra handling */
         break;

diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index 6620e08c47..572a838676 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -67,6 +67,7 @@ typedef enum {
     QEMU_BLOCKJOB_TYPE_CREATE,
     QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE,
     QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE,
+    QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD,
     QEMU_BLOCKJOB_TYPE_BROKEN,
     QEMU_BLOCKJOB_TYPE_LAST
 } qemuBlockJobType;
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 4c0bfcd172..dfbf3dd9f0 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2478,6 +2478,7 @@ qemuDomainObjPrivateXMLFormatBlockjobIterator(void *payload,

         case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
         case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
+        case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD:
             /* No private data for internal snapshot jobs */
             break;

@@ -3035,6 +3036,7 @@ qemuDomainObjPrivateXMLParseBlockjobDataSpecific(qemuBlockJobData *job,

         case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
         case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
+        case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD:
             /* No extra data for internal snapshot jobs. */
             break;

-- 
2.47.0