[PATCH v2 08/10] blockcommit: update error messages related to block jobs

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

 



A future patch will add two-phase block commit jobs; as the
mechanism for managing them is similar to managing a block copy
job, existing errors should be made generic enough to occur
for either job type.

* src/conf/domain_conf.c (virDomainHasDiskMirror): Update
comment.
* src/qemu/qemu_driver.c (qemuDomainDefineXML)
(qemuDomainSnapshotCreateXML, qemuDomainRevertToSnapshot)
(qemuDomainBlockJobImpl, qemuDomainBlockCopy): Update error
message.
* src/qemu/qemu_hotplug.c (qemuDomainDetachDiskDevice): Likewise.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---
 src/conf/domain_conf.c  |  2 +-
 src/qemu/qemu_driver.c  | 10 +++++-----
 src/qemu/qemu_hotplug.c |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index fd75fb6..2b7dc26 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -10379,7 +10379,7 @@ virDomainDiskRemoveByName(virDomainDefPtr def, const char *name)
 }

 /* Return true if VM has at least one disk involved in a current block
- * copy job (that is, with a <mirror> element in the disk xml).  */
+ * copy/commit job (that is, with a <mirror> element in the disk xml).  */
 bool
 virDomainHasDiskMirror(virDomainObjPtr vm)
 {
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b61b01b..6574294 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6257,7 +6257,7 @@ static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const char *xml)
     def = NULL;
     if (virDomainHasDiskMirror(vm)) {
         virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, "%s",
-                       _("domain has active block copy job"));
+                       _("domain has active block job"));
         virDomainObjAssignDef(vm, NULL, false, NULL);
         goto cleanup;
     }
@@ -13467,7 +13467,7 @@ qemuDomainSnapshotCreateXML(virDomainPtr domain,
     }
     if (virDomainHasDiskMirror(vm)) {
         virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, "%s",
-                       _("domain has active block copy job"));
+                       _("domain has active block job"));
         goto cleanup;
     }

@@ -14077,7 +14077,7 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,

     if (virDomainHasDiskMirror(vm)) {
         virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, "%s",
-                       _("domain has active block copy job"));
+                       _("domain has active block job"));
         goto cleanup;
     }

@@ -15077,7 +15077,7 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm,

     if (mode == BLOCK_JOB_PULL && disk->mirror) {
         virReportError(VIR_ERR_BLOCK_COPY_ACTIVE,
-                       _("disk '%s' already in active block copy job"),
+                       _("disk '%s' already in active block job"),
                        disk->dst);
         goto endjob;
     }
@@ -15285,7 +15285,7 @@ qemuDomainBlockCopy(virDomainObjPtr vm,
     disk = vm->def->disks[idx];
     if (disk->mirror) {
         virReportError(VIR_ERR_BLOCK_COPY_ACTIVE,
-                       _("disk '%s' already in active block copy job"),
+                       _("disk '%s' already in active block job"),
                        disk->dst);
         goto endjob;
     }
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index cd43dd5..7289055 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2986,7 +2986,7 @@ qemuDomainDetachDiskDevice(virQEMUDriverPtr driver,

     if (detach->mirror) {
         virReportError(VIR_ERR_BLOCK_COPY_ACTIVE,
-                       _("disk '%s' is in an active block copy job"),
+                       _("disk '%s' is in an active block job"),
                        detach->dst);
         goto cleanup;
     }
-- 
1.9.3

--
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]