mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
qemu: Attach persistent reservations manager if block-copy target requires it
Users can choose to copy a disk into a destination where they want to use persistent reservations. Start the daemon if the configuration requires it. Resolves: https://issues.redhat.com/browse/RHEL-7342 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1697323bfe
commit
946b81a2e9
@ -14389,6 +14389,9 @@ qemuDomainBlockCopyCommon(virDomainObj *vm,
|
||||
goto endjob;
|
||||
}
|
||||
|
||||
if (qemuHotplugAttachManagedPR(vm, mirror, VIR_ASYNC_JOB_NONE) < 0)
|
||||
goto endjob;
|
||||
|
||||
if (data) {
|
||||
qemuDomainObjEnterMonitor(vm);
|
||||
rc = qemuBlockStorageSourceChainAttach(priv->mon, data);
|
||||
@ -14445,6 +14448,8 @@ qemuDomainBlockCopyCommon(virDomainObj *vm,
|
||||
}
|
||||
if (need_revoke)
|
||||
qemuDomainStorageSourceChainAccessRevoke(driver, vm, mirror);
|
||||
|
||||
ignore_value(qemuHotplugRemoveManagedPR(vm, VIR_ASYNC_JOB_NONE));
|
||||
}
|
||||
if (need_unlink && virStorageSourceUnlink(mirror) < 0)
|
||||
VIR_WARN("%s", _("unable to remove just-created copy target"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user