[PATCH 2/4] qemu blockjob: add snapshot-save/delete job types

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

 



Signed-off-by: Nikolai Barybin <nikolai.barybin@xxxxxxxxxxxxx>
---
 src/qemu/qemu_block.c    | 2 ++
 src/qemu/qemu_blockjob.c | 6 +++++-
 src/qemu/qemu_blockjob.h | 2 ++
 src/qemu/qemu_domain.c   | 4 ++++
 4 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
index d6cdf521c4..414803cff2 100644
--- a/src/qemu/qemu_block.c
+++ b/src/qemu/qemu_block.c
@@ -3766,6 +3766,8 @@ qemuBlockPivot(virDomainObj *vm,
     case QEMU_BLOCKJOB_TYPE_INTERNAL:
     case QEMU_BLOCKJOB_TYPE_CREATE:
     case QEMU_BLOCKJOB_TYPE_BROKEN:
+    case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
+    case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
         virReportError(VIR_ERR_OPERATION_INVALID,
                        _("job type '%1$s' does not support pivot"),
                        qemuBlockjobTypeToString(job->type));
diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
index 42856df6d4..0d4fdd64ca 100644
--- a/src/qemu/qemu_blockjob.c
+++ b/src/qemu/qemu_blockjob.c
@@ -68,7 +68,9 @@ VIR_ENUM_IMPL(qemuBlockjob,
               "backup",
               "",
               "create",
-              "broken");
+              "broken",
+              "snapshot-save",
+              "snapshot-delete");
 
 static virClass *qemuBlockJobDataClass;
 
@@ -1450,6 +1452,8 @@ qemuBlockJobEventProcessConcludedTransition(qemuBlockJobData *job,
         break;
 
     case QEMU_BLOCKJOB_TYPE_BROKEN:
+    case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
+    case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
     case QEMU_BLOCKJOB_TYPE_NONE:
     case QEMU_BLOCKJOB_TYPE_INTERNAL:
     case QEMU_BLOCKJOB_TYPE_LAST:
diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
index f1ac43b4c7..d4a3677050 100644
--- a/src/qemu/qemu_blockjob.h
+++ b/src/qemu/qemu_blockjob.h
@@ -66,6 +66,8 @@ typedef enum {
     QEMU_BLOCKJOB_TYPE_INTERNAL,
     QEMU_BLOCKJOB_TYPE_CREATE,
     QEMU_BLOCKJOB_TYPE_BROKEN,
+    QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE,
+    QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE,
     QEMU_BLOCKJOB_TYPE_LAST
 } qemuBlockJobType;
 G_STATIC_ASSERT((int)QEMU_BLOCKJOB_TYPE_INTERNAL == VIR_DOMAIN_BLOCK_JOB_TYPE_LAST);
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 2134b11038..f512921187 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2407,6 +2407,8 @@ qemuDomainObjPrivateXMLFormatBlockjobIterator(void *payload,
             break;
 
         case QEMU_BLOCKJOB_TYPE_BROKEN:
+        case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
+        case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
         case QEMU_BLOCKJOB_TYPE_NONE:
         case QEMU_BLOCKJOB_TYPE_INTERNAL:
         case QEMU_BLOCKJOB_TYPE_LAST:
@@ -2958,6 +2960,8 @@ qemuDomainObjPrivateXMLParseBlockjobDataSpecific(qemuBlockJobData *job,
             break;
 
         case QEMU_BLOCKJOB_TYPE_BROKEN:
+        case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
+        case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
         case QEMU_BLOCKJOB_TYPE_NONE:
         case QEMU_BLOCKJOB_TYPE_INTERNAL:
         case QEMU_BLOCKJOB_TYPE_LAST:
-- 
2.43.5



[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