]> xenbits.xensource.com Git - libvirt.git/commitdiff
Revert "lock_manager: Allow disabling configFile for virLockManagerPluginNew"
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 2 Oct 2018 13:09:45 +0000 (15:09 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 16 Nov 2018 12:42:39 +0000 (13:42 +0100)
This reverts commit 35b5b244da825fb41e35e4dc62e740d716214ec9.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/locking/lock_driver.h
src/locking/lock_driver_lockd.c
src/locking/lock_driver_sanlock.c
src/locking/lock_manager.c

index ae30abda7dfacaa243e4887fc93d98e9bffacaa4..7c8f744be3baa38022856f6ea91ea6645389bddc 100644 (file)
@@ -124,7 +124,6 @@ struct _virLockManagerParam {
 /**
  * virLockDriverInit:
  * @version: the libvirt requested plugin ABI version
- * @configFile: path to config file
  * @flags: the libvirt requested plugin optional extras
  *
  * Allow the plugin to validate the libvirt requested
@@ -132,9 +131,6 @@ struct _virLockManagerParam {
  * to block its use in versions of libvirtd which are
  * too old to support key features.
  *
- * The @configFile variable points to config file that the driver
- * should load. If NULL, no config file should be loaded.
- *
  * NB: A plugin may be loaded multiple times, for different
  * libvirt drivers (eg QEMU, LXC, UML)
  *
index 0c672b05b178d4ca3652a27056271d53940ea389..85cdcf97be6fad76974cf0673d6ad8a0e8aa9c11 100644 (file)
@@ -371,10 +371,8 @@ static int virLockManagerLockDaemonInit(unsigned int version,
     driver->requireLeaseForDisks = true;
     driver->autoDiskLease = true;
 
-    if (configFile &&
-        virLockManagerLockDaemonLoadConfig(configFile) < 0) {
+    if (virLockManagerLockDaemonLoadConfig(configFile) < 0)
         goto error;
-    }
 
     if (driver->autoDiskLease) {
         if (driver->fileLockSpaceDir &&
index 3ad0dc9bedcdc048f43cd461b288d53c7cb53cde..b10d8197c5c367ab9731ba591461e50399cc45e5 100644 (file)
@@ -446,10 +446,8 @@ static int virLockManagerSanlockInit(unsigned int version,
         goto error;
     }
 
-    if (configFile &&
-        virLockManagerSanlockLoadConfig(driver, configFile) < 0) {
+    if (virLockManagerSanlockLoadConfig(driver, configFile) < 0)
         goto error;
-    }
 
     if (driver->autoDiskLease && !driver->hostID) {
         virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
index 9067f5a01af28ede55a9c436eb23285e55f0fe15..d421b6acfc151dfa8236c582bf851a7dd3be13c0 100644 (file)
@@ -104,8 +104,6 @@ static void virLockManagerLogParams(size_t nparams,
 /**
  * virLockManagerPluginNew:
  * @name: the name of the plugin
- * @driverName: the hypervisor driver that loads the plugin
- * @configDir: path to dir where config files are stored
  * @flag: optional plugin flags
  *
  * Attempt to load the plugin $(libdir)/libvirt/lock-driver/@name.so
@@ -131,13 +129,11 @@ virLockManagerPluginPtr virLockManagerPluginNew(const char *name,
     char *configFile = NULL;
 
     VIR_DEBUG("name=%s driverName=%s configDir=%s flags=0x%x",
-              name, NULLSTR(driverName), NULLSTR(configDir), flags);
+              name, driverName, configDir, flags);
 
-    if (driverName && configDir &&
-        virAsprintf(&configFile, "%s/%s-%s.conf",
-                    configDir, driverName, name) < 0) {
+    if (virAsprintf(&configFile, "%s/%s-%s.conf",
+                    configDir, driverName, name) < 0)
         return NULL;
-    }
 
     if (STREQ(name, "nop")) {
         driver = &virLockDriverNop;