提交 278c51af 编写于 作者: E Eric Blake

blockcommit: update error messages related to block jobs

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: NEric Blake <eblake@redhat.com>
上级 17840379
......@@ -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)
{
......
......@@ -6261,7 +6261,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;
}
......@@ -13465,7 +13465,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;
}
......@@ -14075,7 +14075,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;
}
......@@ -15075,7 +15075,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;
}
......@@ -15283,7 +15283,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;
}
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册