提交 37e80134 编写于 作者: P Peter Krempa

qemu: migration: Access job name from job struct

qemuMigrationSrcNBDCopyCancelOne uses the block job data structure but
generated it's own job name rather than taking it from the block job
data.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
上级 5339f57a
......@@ -649,7 +649,6 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver,
qemuDomainAsyncJob asyncJob)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
char *diskAlias = NULL;
int ret = -1;
int status;
int rv;
......@@ -668,13 +667,10 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver,
goto cleanup;
}
if (!(diskAlias = qemuAliasDiskDriveFromDisk(disk)))
return -1;
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
goto cleanup;
rv = qemuMonitorBlockJobCancel(priv->mon, diskAlias);
rv = qemuMonitorBlockJobCancel(priv->mon, job->name);
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rv < 0)
goto cleanup;
......@@ -682,7 +678,6 @@ qemuMigrationSrcNBDCopyCancelOne(virQEMUDriverPtr driver,
ret = 0;
cleanup:
VIR_FREE(diskAlias);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册