提交 b4f113ee 编写于 作者: P Peter Krempa

qemu: command: Move check whether PR manager object props need to be built

Move it out of the format function and let the caller decide this.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
上级 8f7c25ae
......@@ -9737,9 +9737,6 @@ qemuBuildPRManagerInfoProps(const virDomainDiskDef *disk,
*propsret = NULL;
*aliasret = NULL;
if (!disk->src->pr)
return 0;
if (virStoragePRDefIsManaged(disk->src->pr)) {
if (VIR_STRDUP(alias, qemuDomainGetManagedPRAlias()) < 0)
goto cleanup;
......@@ -9775,6 +9772,9 @@ qemuBuildMasterPRCommandLine(virCommandPtr cmd,
for (i = 0; i < def->ndisks; i++) {
const virDomainDiskDef *disk = def->disks[i];
if (!disk->src->pr)
continue;
if (virStoragePRDefIsManaged(disk->src->pr)) {
if (managedAdded)
continue;
......@@ -9785,9 +9785,6 @@ qemuBuildMasterPRCommandLine(virCommandPtr cmd,
if (qemuBuildPRManagerInfoProps(disk, &props, &alias) < 0)
goto cleanup;
if (!props)
continue;
if (!(tmp = virQEMUBuildObjectCommandlineFromJSON("pr-manager-helper",
alias,
props)))
......
......@@ -395,6 +395,9 @@ qemuMaybeBuildPRManagerInfoProps(virDomainObjPtr vm,
*propsret = NULL;
*aliasret = NULL;
if (!disk->src->pr)
return 0;
if (virStoragePRDefIsManaged(disk->src->pr) &&
priv->prDaemonRunning) {
/* @disk requires qemu-pr-helper but there's already one running. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册