提交 b1832825 编写于 作者: M Michal Privoznik

qemu_domain: Modify access to a NVMe disk iff needed

If a domain has a NVMe disk it already has the access configured.
Trying to configure it again on a commit or some other operation
is wrong and condemned to failure.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 c246cfc4
......@@ -11676,13 +11676,12 @@ qemuDomainStorageSourceAccessModify(virQEMUDriverPtr driver,
revoke_lockspace = true;
if (qemuDomainStorageSourceAccessModifyNVMe(driver, vm, src, false) < 0)
goto revoke;
if (!(flags & QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_MODIFY_ACCESS)) {
if (qemuDomainStorageSourceAccessModifyNVMe(driver, vm, src, false) < 0)
goto revoke;
revoke_nvme = true;
revoke_nvme = true;
/* When modifying access of existing @src namespace does not need update */
if (!(flags & QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_MODIFY_ACCESS)) {
if (qemuDomainNamespaceSetupDisk(vm, src) < 0)
goto revoke;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册