[PATCH 5/5] qemu: Attach persistent reservations manager if block-copy target requires it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1b5ac883b5..78bfaa5b3a 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -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"));
-- 
2.48.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux