qemu: Add enum entries for 'snapshot-load' qemu job

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>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Peter Krempa 2024-11-07 12:57:42 +01:00
parent 2ed93e1a4b
commit 6902e77c01
4 changed files with 6 additions and 0 deletions

View File

@ -3777,6 +3777,7 @@ qemuBlockPivot(virDomainObj *vm,
case QEMU_BLOCKJOB_TYPE_CREATE: case QEMU_BLOCKJOB_TYPE_CREATE:
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD:
case QEMU_BLOCKJOB_TYPE_BROKEN: case QEMU_BLOCKJOB_TYPE_BROKEN:
virReportError(VIR_ERR_OPERATION_INVALID, virReportError(VIR_ERR_OPERATION_INVALID,
_("job type '%1$s' does not support pivot"), _("job type '%1$s' does not support pivot"),

View File

@ -70,6 +70,7 @@ VIR_ENUM_IMPL(qemuBlockjob,
"create", "create",
"snapshot-save", "snapshot-save",
"snapshot-delete", "snapshot-delete",
"snapshot-load",
"broken"); "broken");
static virClass *qemuBlockJobDataClass; static virClass *qemuBlockJobDataClass;
@ -1459,6 +1460,7 @@ qemuBlockJobEventProcessConcludedTransition(qemuBlockJobData *job,
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD:
/* The internal snapshot jobs don't need any extra handling */ /* The internal snapshot jobs don't need any extra handling */
break; break;

View File

@ -67,6 +67,7 @@ typedef enum {
QEMU_BLOCKJOB_TYPE_CREATE, QEMU_BLOCKJOB_TYPE_CREATE,
QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE, QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE,
QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE, QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE,
QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD,
QEMU_BLOCKJOB_TYPE_BROKEN, QEMU_BLOCKJOB_TYPE_BROKEN,
QEMU_BLOCKJOB_TYPE_LAST QEMU_BLOCKJOB_TYPE_LAST
} qemuBlockJobType; } qemuBlockJobType;

View File

@ -2478,6 +2478,7 @@ qemuDomainObjPrivateXMLFormatBlockjobIterator(void *payload,
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD:
/* No private data for internal snapshot jobs */ /* No private data for internal snapshot jobs */
break; break;
@ -3035,6 +3036,7 @@ qemuDomainObjPrivateXMLParseBlockjobDataSpecific(qemuBlockJobData *job,
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_SAVE:
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE: case QEMU_BLOCKJOB_TYPE_SNAPSHOT_DELETE:
case QEMU_BLOCKJOB_TYPE_SNAPSHOT_LOAD:
/* No extra data for internal snapshot jobs. */ /* No extra data for internal snapshot jobs. */
break; break;