[libvirt] [PATCH] qemu-agent: remove redundant comments
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)gmail.com>
Signed-off-by: Chen Hanxiao <chenhanxiao(a)gmail.com>
---
src/qemu/qemu_agent.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/src/qemu/qemu_agent.c b/src/qemu/qemu_agent.c
index c55f304..20597b4 100644
--- a/src/qemu/qemu_agent.c
+++ b/src/qemu/qemu_agent.c
@@ -287,17 +287,6 @@ qemuAgentIOProcessEvent(qemuAgentPtr mon,
return -1;
}
-/*
- for (i = 0; i < ARRAY_CARDINALITY(eventHandlers); i++) {
- if (STREQ(eventHandlers[i].type, type)) {
- virJSONValuePtr data = virJSONValueObjectGet(obj, "data");
- VIR_DEBUG("handle %s handler=%p data=%p", type,
- eventHandlers[i].handler, data);
- (eventHandlers[i].handler)(mon, data);
- break;
- }
- }
-*/
return 0;
}
--
1.8.3.1
8 years, 7 months
[libvirt] [PATCH 00/17] Cleanup CPU driver code a bit
by Jiri Denemark
Jiri Denemark (17):
cpu_x86: Rename struct x86_vendor
cpu_x86: Rename struct x86_feature
cpu_x86: Rename struct x86_kvm_feature
cpu_x86: Rename struct x86_model
cpu_x86: Rename struct x86_map
cpu_x86: Rename enum compare_result
cpu_x86: Rename struct virCPUx86DataIterator
cpu_x86: Compare CPU candidates in a separate function
cpu_x86: Rename cleanup labels
cpu_x86: Use for loop in x86Decode
cpu_x86: Remove comparisons to NULL
cpu_x86: Simplify insertions into a linked list
cpu_x86: Don't ignore parsing errors in x86VendorLoad
cpu_x86: Don't ignore parsing errors in x86FeatureLoad
cpu_x86: Don't ignore parsing errors in x86ModelLoad
cpu_x86: Check vendor early
cpu: Properly report errors when parsing CPU map XML
src/cpu/cpu_map.c | 11 +-
src/cpu/cpu_x86.c | 564 +++++++++++++++++++++++++++---------------------------
2 files changed, 287 insertions(+), 288 deletions(-)
--
2.8.2
8 years, 7 months
[libvirt] [PATCH 0/6] Don't disable auto_login for non libvirt managed iSCSI targets
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1331552
This is based on :
http://www.redhat.com/archives/libvir-list/2016-May/msg00002.html
which I had to first "hand massage" to get to apply and then had to
make a couple of adjustments in order to compile. Since the review,
Fritz responded directly to me and I've exchanged some thoughts back
to him as I dug deeper into the issue.
Patches 1 & 2 are related to the problem insomuch as the iscsi code
will first try to "see" if a client connection already exists and if
so, it won't try to recreate one. If one doesn't exist, then it will
try to create one. So in a way it actually expects an error for a
couple of paths. That error would be splatted out (in my case in
the window I was running libvirtd in debug mode). So the patches
make it so one can get an exitstatus and error buffer if they so
choose when running the virCommandRunRegex
Patches 3-6 are essentially a step by step rework of Fritz's patch
with one change. In Fritz's patch the model was to remove the big
hammer approach taken to set the "node.startup" to "manual" for every
target found for the portal (e.g. the <ipaddr:port>). My approach alters
that by only setting "node.startup" to "manual" for any target which
libvirt manages via an iSCSI storage pool. I think that keeps the
spirit of the original change (commit id '3c12b654') in tact while
also making sure to not set "manual" mode on targets libvirt doesn't
manage.
Fritz Elfert (1):
util: Add "--op nonpersistent" to iSCSI sendtargets
John Ferlan (5):
util: Add exitstatus parameter to virCommandRunRegex
iscsi: Add exit status checking for virISCSIGetSession
iscsi: Export virISCSITargetAutologin
iscsi: Inhibit autologin for only libvirt managed targets
iscsi: Remove initiatoriqn from virISCSIScanTargets
src/libvirt_private.syms | 1 +
src/storage/storage_backend_fs.c | 2 +-
src/storage/storage_backend_iscsi.c | 19 +++++++++-----
src/storage/storage_backend_logical.c | 10 ++++---
src/util/vircommand.c | 9 ++++---
src/util/vircommand.h | 3 ++-
src/util/viriscsi.c | 49 ++++++++++++++++++++---------------
src/util/viriscsi.h | 8 +++++-
tests/viriscsitest.c | 7 ++---
9 files changed, 68 insertions(+), 40 deletions(-)
--
2.5.5
8 years, 7 months
[libvirt] [PATCH] qemu: command: Ignore QEMU_CAPS_DEVICE when building drive alias
by Cole Robinson
QEMU_CAPS_DEVICE is always set nowadays, so we can drop the
non-DEVICE code paths
---
src/qemu/qemu_command.c | 12 ++++--------
src/qemu/qemu_command.h | 3 +--
src/qemu/qemu_hotplug.c | 4 ++--
3 files changed, 7 insertions(+), 12 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 0d6d5f8..4286999 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -377,17 +377,13 @@ qemuBuildObjectCommandlineFromJSON(const char *type,
}
-char *qemuDeviceDriveHostAlias(virDomainDiskDefPtr disk,
- virQEMUCapsPtr qemuCaps)
+char *qemuDeviceDriveHostAlias(virDomainDiskDefPtr disk)
{
char *ret;
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
- ignore_value(virAsprintf(&ret, "%s%s", QEMU_DRIVE_HOST_PREFIX,
- disk->info.alias));
- } else {
- ignore_value(VIR_STRDUP(ret, disk->info.alias));
- }
+ if (virAsprintf(&ret, "%s%s",
+ QEMU_DRIVE_HOST_PREFIX, disk->info.alias) < 0)
+ return NULL;
return ret;
}
diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h
index d5ad1b2..c777701 100644
--- a/src/qemu/qemu_command.h
+++ b/src/qemu/qemu_command.h
@@ -96,8 +96,7 @@ char *qemuBuildNicDevStr(virDomainDefPtr def,
size_t vhostfdSize,
virQEMUCapsPtr qemuCaps);
-char *qemuDeviceDriveHostAlias(virDomainDiskDefPtr disk,
- virQEMUCapsPtr qemuCaps);
+char *qemuDeviceDriveHostAlias(virDomainDiskDefPtr disk);
/* Both legacy & current support */
char *qemuBuildDriveStr(virDomainDiskDefPtr disk,
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index f40b34d..f8ab095 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -192,7 +192,7 @@ qemuDomainChangeEjectableMedia(virQEMUDriverPtr driver,
if (qemuDomainPrepareDisk(driver, vm, disk, newsrc, false) < 0)
goto cleanup;
- if (!(driveAlias = qemuDeviceDriveHostAlias(disk, priv->qemuCaps)))
+ if (!(driveAlias = qemuDeviceDriveHostAlias(disk)))
goto error;
do {
@@ -376,7 +376,7 @@ qemuDomainAttachVirtioDiskDevice(virConnectPtr conn,
if (!(drivestr = qemuBuildDriveStr(disk, false, priv->qemuCaps)))
goto error;
- if (!(drivealias = qemuDeviceDriveHostAlias(disk, priv->qemuCaps)))
+ if (!(drivealias = qemuDeviceDriveHostAlias(disk)))
goto error;
if (!(devstr = qemuBuildDriveDevStr(vm->def, disk, 0, priv->qemuCaps)))
--
2.7.4
8 years, 7 months
[libvirt] [PATCH 0/3] Fix a few issues in cpuGetModels
by Jiri Denemark
Jiri Denemark (3):
cpuGetModels: Switch to virArch
cpuGetModels: Fix memory leak on error
cpuGetModels: Create a NULL-terminated list
src/cpu/cpu.c | 19 +++++--------------
src/cpu/cpu.h | 3 +--
src/cpu/cpu_ppc64.c | 11 ++++++++++-
src/cpu/cpu_x86.c | 11 ++++++++++-
src/driver-hypervisor.h | 2 +-
src/qemu/qemu_driver.c | 11 ++++++++++-
src/test/test_driver.c | 12 +++++++++++-
7 files changed, 48 insertions(+), 21 deletions(-)
--
2.8.2
8 years, 7 months
[libvirt] [PATCH] qemu_hotplug: correctly parse device XML provided by user
by Pavel Hrdina
Commit 1ccc7fbf fixed port checking for live device update, which
revealed another bug. If we updating live domain we need to parse the
device also as live.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1336134
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/qemu/qemu_driver.c | 47 +++++++++++++++++++++++------------------------
1 file changed, 23 insertions(+), 24 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 37d970e..9602f4d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -8325,7 +8325,8 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
virQEMUDriverPtr driver = dom->conn->privateData;
virDomainObjPtr vm = NULL;
virDomainDefPtr vmdef = NULL;
- virDomainDeviceDefPtr dev = NULL, dev_copy = NULL;
+ virDomainDeviceDefPtr devConfig = NULL;
+ virDomainDeviceDefPtr devLive = NULL;
bool force = (flags & VIR_DOMAIN_DEVICE_MODIFY_FORCE) != 0;
int ret = -1;
virQEMUCapsPtr qemuCaps = NULL;
@@ -8355,26 +8356,24 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_MODIFY) < 0)
goto cleanup;
- dev = dev_copy = virDomainDeviceDefParse(xml, vm->def,
- caps, driver->xmlopt,
- VIR_DOMAIN_DEF_PARSE_INACTIVE);
- if (dev == NULL)
- goto endjob;
-
- if (virDomainObjUpdateModificationImpact(vm, &flags) < 0)
- goto endjob;
+ if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
+ devConfig = virDomainDeviceDefParse(xml, vm->def,
+ caps, driver->xmlopt,
+ VIR_DOMAIN_DEF_PARSE_INACTIVE);
+ if (!devConfig)
+ goto endjob;
+ }
- if (flags & VIR_DOMAIN_AFFECT_CONFIG &&
- flags & VIR_DOMAIN_AFFECT_LIVE) {
- /* If we are affecting both CONFIG and LIVE
- * create a deep copy of device as adding
- * to CONFIG takes one instance.
- */
- dev_copy = virDomainDeviceDefCopy(dev, vm->def, caps, driver->xmlopt);
- if (!dev_copy)
+ if (flags & VIR_DOMAIN_AFFECT_LIVE) {
+ devLive = virDomainDeviceDefParse(xml, vm->def,
+ caps, driver->xmlopt, 0);
+ if (!devLive)
goto endjob;
}
+ if (virDomainObjUpdateModificationImpact(vm, &flags) < 0)
+ goto endjob;
+
if (priv->qemuCaps)
qemuCaps = virObjectRef(priv->qemuCaps);
else if (!(qemuCaps = virQEMUCapsCacheLookup(driver->qemuCapsCache, vm->def->emulator)))
@@ -8386,20 +8385,21 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
if (!vmdef)
goto endjob;
- if (virDomainDefCompatibleDevice(vmdef, dev,
+ if (virDomainDefCompatibleDevice(vmdef, devConfig,
VIR_DOMAIN_DEVICE_ACTION_UPDATE) < 0)
goto endjob;
- if ((ret = qemuDomainUpdateDeviceConfig(qemuCaps, vmdef, dev)) < 0)
+ if ((ret = qemuDomainUpdateDeviceConfig(qemuCaps, vmdef, devConfig)) < 0)
goto endjob;
}
if (flags & VIR_DOMAIN_AFFECT_LIVE) {
- if (virDomainDefCompatibleDevice(vm->def, dev_copy,
+ if (virDomainDefCompatibleDevice(vm->def, devLive,
VIR_DOMAIN_DEVICE_ACTION_UPDATE) < 0)
goto endjob;
- if ((ret = qemuDomainUpdateDeviceLive(dom->conn, vm, dev_copy, dom, force)) < 0)
+ if ((ret = qemuDomainUpdateDeviceLive(dom->conn, vm, devLive,
+ dom, force)) < 0)
goto endjob;
/*
* update domain status forcibly because the domain status may be
@@ -8427,9 +8427,8 @@ static int qemuDomainUpdateDeviceFlags(virDomainPtr dom,
cleanup:
virObjectUnref(qemuCaps);
virDomainDefFree(vmdef);
- if (dev != dev_copy)
- virDomainDeviceDefFree(dev_copy);
- virDomainDeviceDefFree(dev);
+ virDomainDeviceDefFree(devConfig);
+ virDomainDeviceDefFree(devLive);
virDomainObjEndAPI(&vm);
virObjectUnref(caps);
virObjectUnref(cfg);
--
2.8.2
8 years, 7 months
[libvirt] [PATCH 0/2] libxl: support pvusb
by Chunyan Liu
This patch series is to support pvusb in libxl driver.
Chunyan Liu (2):
libxl: support creating guest with USB hostdev
libxl: support hotplug USB host device
src/libxl/libxl_conf.c | 71 +++++++++++++++++++++++++
src/libxl/libxl_conf.h | 3 ++
src/libxl/libxl_domain.c | 4 +-
src/libxl/libxl_driver.c | 132 ++++++++++++++++++++++++++++++++++++++++++++++-
4 files changed, 206 insertions(+), 4 deletions(-)
--
2.1.4
8 years, 7 months
[libvirt] [PATCH 0/3] caps tests: Give better names to test data files
by Jiri Denemark
Jiri Denemark (3):
domaincapstest: Use arch strings
domaincapstest: Give better names to test data files
qemuaincapstest: Give better names to test data files
.../{domaincaps-basic.xml => basic.xml} | 0
.../{domaincaps-full.xml => full.xml} | 0
...ps-qemu_1.6.50-1.xml => qemu_1.6.50.x86_64.xml} | 0
...6.0-3.xml => qemu_2.6.0-gicv2-virt.aarch64.xml} | 0
...6.0-4.xml => qemu_2.6.0-gicv3-virt.aarch64.xml} | 0
...aps-qemu_2.6.0-2.xml => qemu_2.6.0.aarch64.xml} | 0
...aps-qemu_2.6.0-5.xml => qemu_2.6.0.ppc64le.xml} | 0
...caps-qemu_2.6.0-1.xml => qemu_2.6.0.x86_64.xml} | 0
tests/domaincapstest.c | 52 +++++++++++++---------
...-1.x86_64.replies => caps_1.2.2.x86_64.replies} | 0
...ps_1.2.2-1.x86_64.xml => caps_1.2.2.x86_64.xml} | 0
...-1.x86_64.replies => caps_1.3.1.x86_64.replies} | 0
...ps_1.3.1-1.x86_64.xml => caps_1.3.1.x86_64.xml} | 0
...-1.x86_64.replies => caps_1.4.2.x86_64.replies} | 0
...ps_1.4.2-1.x86_64.xml => caps_1.4.2.x86_64.xml} | 0
...-1.x86_64.replies => caps_1.5.3.x86_64.replies} | 0
...ps_1.5.3-1.x86_64.xml => caps_1.5.3.x86_64.xml} | 0
...-1.x86_64.replies => caps_1.6.0.x86_64.replies} | 0
...ps_1.6.0-1.x86_64.xml => caps_1.6.0.x86_64.xml} | 0
...1.x86_64.replies => caps_1.6.50.x86_64.replies} | 0
..._1.6.50-1.x86_64.xml => caps_1.6.50.x86_64.xml} | 0
...-1.x86_64.replies => caps_2.1.1.x86_64.replies} | 0
...ps_2.1.1-1.x86_64.xml => caps_2.1.1.x86_64.xml} | 0
...-1.x86_64.replies => caps_2.4.0.x86_64.replies} | 0
...ps_2.4.0-1.x86_64.xml => caps_2.4.0.x86_64.xml} | 0
...-1.x86_64.replies => caps_2.5.0.x86_64.replies} | 0
...ps_2.5.0-1.x86_64.xml => caps_2.5.0.x86_64.xml} | 0
...64.replies => caps_2.6.0-gicv2.aarch64.replies} | 0
...-1.aarch64.xml => caps_2.6.0-gicv2.aarch64.xml} | 0
...64.replies => caps_2.6.0-gicv3.aarch64.replies} | 0
...-2.aarch64.xml => caps_2.6.0-gicv3.aarch64.xml} | 0
....ppc64le.replies => caps_2.6.0.ppc64le.replies} | 0
..._2.6.0-1.ppc64le.xml => caps_2.6.0.ppc64le.xml} | 0
...-1.x86_64.replies => caps_2.6.0.x86_64.replies} | 0
...ps_2.6.0-1.x86_64.xml => caps_2.6.0.x86_64.xml} | 0
tests/qemucapabilitiestest.c | 26 +++++------
36 files changed, 44 insertions(+), 34 deletions(-)
rename tests/domaincapsschemadata/{domaincaps-basic.xml => basic.xml} (100%)
rename tests/domaincapsschemadata/{domaincaps-full.xml => full.xml} (100%)
rename tests/domaincapsschemadata/{domaincaps-qemu_1.6.50-1.xml => qemu_1.6.50.x86_64.xml} (100%)
rename tests/domaincapsschemadata/{domaincaps-qemu_2.6.0-3.xml => qemu_2.6.0-gicv2-virt.aarch64.xml} (100%)
rename tests/domaincapsschemadata/{domaincaps-qemu_2.6.0-4.xml => qemu_2.6.0-gicv3-virt.aarch64.xml} (100%)
rename tests/domaincapsschemadata/{domaincaps-qemu_2.6.0-2.xml => qemu_2.6.0.aarch64.xml} (100%)
rename tests/domaincapsschemadata/{domaincaps-qemu_2.6.0-5.xml => qemu_2.6.0.ppc64le.xml} (100%)
rename tests/domaincapsschemadata/{domaincaps-qemu_2.6.0-1.xml => qemu_2.6.0.x86_64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_1.2.2-1.x86_64.replies => caps_1.2.2.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.2.2-1.x86_64.xml => caps_1.2.2.x86_64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_1.3.1-1.x86_64.replies => caps_1.3.1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.3.1-1.x86_64.xml => caps_1.3.1.x86_64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_1.4.2-1.x86_64.replies => caps_1.4.2.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.4.2-1.x86_64.xml => caps_1.4.2.x86_64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_1.5.3-1.x86_64.replies => caps_1.5.3.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.5.3-1.x86_64.xml => caps_1.5.3.x86_64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_1.6.0-1.x86_64.replies => caps_1.6.0.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.6.0-1.x86_64.xml => caps_1.6.0.x86_64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_1.6.50-1.x86_64.replies => caps_1.6.50.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_1.6.50-1.x86_64.xml => caps_1.6.50.x86_64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_2.1.1-1.x86_64.replies => caps_2.1.1.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.1.1-1.x86_64.xml => caps_2.1.1.x86_64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_2.4.0-1.x86_64.replies => caps_2.4.0.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.4.0-1.x86_64.xml => caps_2.4.0.x86_64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_2.5.0-1.x86_64.replies => caps_2.5.0.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.5.0-1.x86_64.xml => caps_2.5.0.x86_64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-1.aarch64.replies => caps_2.6.0-gicv2.aarch64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-1.aarch64.xml => caps_2.6.0-gicv2.aarch64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-2.aarch64.replies => caps_2.6.0-gicv3.aarch64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-2.aarch64.xml => caps_2.6.0-gicv3.aarch64.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-1.ppc64le.replies => caps_2.6.0.ppc64le.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-1.ppc64le.xml => caps_2.6.0.ppc64le.xml} (100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-1.x86_64.replies => caps_2.6.0.x86_64.replies} (100%)
rename tests/qemucapabilitiesdata/{caps_2.6.0-1.x86_64.xml => caps_2.6.0.x86_64.xml} (100%)
--
2.8.2
8 years, 7 months
Re: [libvirt] [PATCH] qemu: Add necessary for drive-backup block job constant
by Dmitry Mishin
ping
On 25/04/16 14:16, "Dmitry Mishin" <dim(a)virtuozzo.com> wrote:
>If one wants to monitor 'drive-backup' command progress and completion,
>he needs a constant to recognize that. Right now, libvirt reports such
>block jobs as 'unknown'.
>
>Signed-off-by: Dmitry Mishin <dim(a)virtuozzo.com>
>---
> examples/object-events/event-test.c | 3 +++
> include/libvirt/libvirt-domain.h | 3 +++
> src/conf/domain_conf.c | 2 +-
> src/qemu/qemu_monitor_json.c | 2 ++
> tools/virsh-domain.c | 3 ++-
> 5 files changed, 11 insertions(+), 2 deletions(-)
>
>diff --git a/examples/object-events/event-test.c
>b/examples/object-events/event-test.c
>index 2063536..57d3610 100644
>--- a/examples/object-events/event-test.c
>+++ b/examples/object-events/event-test.c
>@@ -745,6 +745,9 @@ blockJobTypeToStr(int type)
>
> case VIR_DOMAIN_BLOCK_JOB_TYPE_ACTIVE_COMMIT:
> return "active layer block commit";
>+
>+ case VIR_DOMAIN_BLOCK_JOB_TYPE_BACKUP:
>+ return "block backup";
> }
>
> return "unknown";
>diff --git a/include/libvirt/libvirt-domain.h
>b/include/libvirt/libvirt-domain.h
>index 160f20f..17ea991 100644
>--- a/include/libvirt/libvirt-domain.h
>+++ b/include/libvirt/libvirt-domain.h
>@@ -1941,6 +1941,9 @@ typedef enum {
> /* Active Block Commit (virDomainBlockCommit with flags), job
> * exists as long as sync is active */
>
>+ VIR_DOMAIN_BLOCK_JOB_TYPE_BACKUP = 5,
>+ /* Block Backup job */
>+
> # ifdef VIR_ENUM_SENTINELS
> VIR_DOMAIN_BLOCK_JOB_TYPE_LAST
> # endif
>diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
>index 28248c8..30c97e3 100644
>--- a/src/conf/domain_conf.c
>+++ b/src/conf/domain_conf.c
>@@ -820,7 +820,7 @@ VIR_ENUM_IMPL(virDomainLoader,
> * <mirror> XML (remaining types are not two-phase). */
> VIR_ENUM_DECL(virDomainBlockJob)
> VIR_ENUM_IMPL(virDomainBlockJob, VIR_DOMAIN_BLOCK_JOB_TYPE_LAST,
>- "", "", "copy", "", "active-commit")
>+ "", "", "copy", "", "active-commit", "")
>
> VIR_ENUM_IMPL(virDomainMemoryModel, VIR_DOMAIN_MEMORY_MODEL_LAST,
> "", "dimm")
>diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
>index 7bb9976..61fbdd9 100644
>--- a/src/qemu/qemu_monitor_json.c
>+++ b/src/qemu/qemu_monitor_json.c
>@@ -831,6 +831,8 @@ qemuMonitorJSONHandleBlockJobImpl(qemuMonitorPtr mon,
> type = VIR_DOMAIN_BLOCK_JOB_TYPE_COMMIT;
> else if (STREQ(type_str, "mirror"))
> type = VIR_DOMAIN_BLOCK_JOB_TYPE_COPY;
>+ else if (STREQ(type_str, "backup"))
>+ type = VIR_DOMAIN_BLOCK_JOB_TYPE_BACKUP;
>
> switch ((virConnectDomainEventBlockJobStatus) event) {
> case VIR_DOMAIN_BLOCK_JOB_COMPLETED:
>diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
>index a9f70dc..1b8c9b9 100644
>--- a/tools/virsh-domain.c
>+++ b/tools/virsh-domain.c
>@@ -2527,7 +2527,8 @@ VIR_ENUM_IMPL(virshDomainBlockJob,
> N_("Block Pull"),
> N_("Block Copy"),
> N_("Block Commit"),
>- N_("Active Block Commit"))
>+ N_("Active Block Commit"),
>+ N_("Block Backup"))
>
> static const char *
> virshDomainBlockJobToString(int type)
>--
>1.8.3.1
>
8 years, 7 months