mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c246cfc486
commit
b18328256b
@ -11676,13 +11676,12 @@ qemuDomainStorageSourceAccessModify(virQEMUDriverPtr driver,
|
||||
|
||||
revoke_lockspace = true;
|
||||
|
||||
if (qemuDomainStorageSourceAccessModifyNVMe(driver, vm, src, false) < 0)
|
||||
goto revoke;
|
||||
|
||||
revoke_nvme = true;
|
||||
|
||||
/* When modifying access of existing @src namespace does not need update */
|
||||
if (!(flags & QEMU_DOMAIN_STORAGE_SOURCE_ACCESS_MODIFY_ACCESS)) {
|
||||
if (qemuDomainStorageSourceAccessModifyNVMe(driver, vm, src, false) < 0)
|
||||
goto revoke;
|
||||
|
||||
revoke_nvme = true;
|
||||
|
||||
if (qemuDomainNamespaceSetupDisk(vm, src) < 0)
|
||||
goto revoke;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user