[PATCH] sanlock: avoid lockspace setup when auto_disk_lease is off

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

 



When auto_disk_lease is off we should avoid the automatic lockspace
creation.

Signed-off-by: Federico Simoncelli <fsimonce@xxxxxxxxxx>
---
 src/locking/lock_driver_sanlock.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index cd2bbb5..29d4176 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -294,8 +294,10 @@ static int virLockManagerSanlockInit(unsigned int version,
         goto error;
     }
 
-    if (virLockManagerSanlockSetupLockspace() < 0)
-        goto error;
+    if (driver->autoDiskLease) {
+        if (virLockManagerSanlockSetupLockspace() < 0)
+            goto error;
+    }
 
     return 0;
 
-- 
1.7.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[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]