mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-17 06:04:23 +03:00
lvm.static uses built-in cluster locking instead of external locking.
Don't attempt to load shared libraries if built statically.
This commit is contained in:
parent
1c792fad4f
commit
a45da5f676
@ -1,5 +1,7 @@
|
|||||||
Version 2.02.10 -
|
Version 2.02.10 -
|
||||||
==================================
|
==================================
|
||||||
|
lvm.static uses built-in cluster locking instead of external locking.
|
||||||
|
Don't attempt to load shared libraries if built statically.
|
||||||
Change default locking_lib to liblvm2clusterlock.so.
|
Change default locking_lib to liblvm2clusterlock.so.
|
||||||
Add skip_dev_dir() to process command line VGs.
|
Add skip_dev_dir() to process command line VGs.
|
||||||
Stop clvmd complaining about nodes that have left the cluster.
|
Stop clvmd complaining about nodes that have left the cluster.
|
||||||
|
@ -646,8 +646,9 @@ static int _init_formats(struct cmd_context *cmd)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBDL
|
#ifdef HAVE_LIBDL
|
||||||
/* Load any formats in shared libs */
|
/* Load any formats in shared libs if not static */
|
||||||
if ((cn = find_config_tree_node(cmd, "global/format_libraries"))) {
|
if (!cmd->is_static &&
|
||||||
|
(cn = find_config_tree_node(cmd, "global/format_libraries"))) {
|
||||||
|
|
||||||
struct config_value *cv;
|
struct config_value *cv;
|
||||||
struct format_type *(*init_format_fn) (struct cmd_context *);
|
struct format_type *(*init_format_fn) (struct cmd_context *);
|
||||||
@ -740,8 +741,9 @@ static int _init_segtypes(struct cmd_context *cmd)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBDL
|
#ifdef HAVE_LIBDL
|
||||||
/* Load any formats in shared libs */
|
/* Load any formats in shared libs unless static */
|
||||||
if ((cn = find_config_tree_node(cmd, "global/segment_libraries"))) {
|
if (!cmd->is_static &&
|
||||||
|
(cn = find_config_tree_node(cmd, "global/segment_libraries"))) {
|
||||||
|
|
||||||
struct config_value *cv;
|
struct config_value *cv;
|
||||||
struct segment_type *(*init_segtype_fn) (struct cmd_context *);
|
struct segment_type *(*init_segtype_fn) (struct cmd_context *);
|
||||||
|
@ -134,24 +134,27 @@ int init_locking(int type, struct cmd_context *cmd)
|
|||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
|
log_very_verbose("File-based locking selected.");
|
||||||
if (!init_file_locking(&_locking, cmd))
|
if (!init_file_locking(&_locking, cmd))
|
||||||
break;
|
break;
|
||||||
log_very_verbose("File-based locking enabled.");
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
#ifdef HAVE_LIBDL
|
#ifdef HAVE_LIBDL
|
||||||
case 2:
|
case 2:
|
||||||
if (!init_external_locking(&_locking, cmd))
|
if (!cmd->is_static) {
|
||||||
break;
|
log_very_verbose("External locking selected.");
|
||||||
log_very_verbose("External locking enabled.");
|
if (!init_external_locking(&_locking, cmd))
|
||||||
return 1;
|
break;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
/* Fall through */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CLUSTER_LOCKING_INTERNAL
|
#ifdef CLUSTER_LOCKING_INTERNAL
|
||||||
case 3:
|
case 3:
|
||||||
|
log_very_verbose("Cluster locking selected.");
|
||||||
if (!init_cluster_locking(&_locking, cmd))
|
if (!init_cluster_locking(&_locking, cmd))
|
||||||
break;
|
break;
|
||||||
log_very_verbose("Cluster locking enabled.");
|
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "lvm-string.h"
|
#include "lvm-string.h"
|
||||||
#include "sharedlib.h"
|
#include "sharedlib.h"
|
||||||
|
#include "toolcontext.h"
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -43,6 +44,12 @@ void *load_shared_library(struct cmd_context *cmd, const char *libname,
|
|||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
void *library;
|
void *library;
|
||||||
|
|
||||||
|
if (cmd->is_static) {
|
||||||
|
log_error("Not loading shared %s library %s in static mode.",
|
||||||
|
desc, libname);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
get_shared_library_path(cmd, libname, path, sizeof(path));
|
get_shared_library_path(cmd, libname, path, sizeof(path));
|
||||||
|
|
||||||
log_very_verbose("Opening shared %s library %s", desc, path);
|
log_very_verbose("Opening shared %s library %s", desc, path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user