public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: agk@sourceware.org
To: lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/commands/toolcontext.c li ...
Date: Thu, 31 Aug 2006 22:21:00 -0000	[thread overview]
Message-ID: <20060831222101.32372.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2006-08-31 22:21:00

Modified files:
	.              : WHATS_NEW 
	lib/commands   : toolcontext.c 
	lib/locking    : locking.c 
	lib/misc       : sharedlib.c 

Log message:
	lvm.static uses built-in cluster locking instead of external locking.
	Don't attempt to load shared libraries if built statically.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.433&r2=1.434
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.41&r2=1.42
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/locking.c.diff?cvsroot=lvm2&r1=1.31&r2=1.32
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/sharedlib.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13

--- LVM2/WHATS_NEW	2006/08/31 20:56:33	1.433
+++ LVM2/WHATS_NEW	2006/08/31 22:21:00	1.434
@@ -1,5 +1,7 @@
 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.
   Add skip_dev_dir() to process command line VGs.
   Stop clvmd complaining about nodes that have left the cluster.
--- LVM2/lib/commands/toolcontext.c	2006/08/21 12:54:51	1.41
+++ LVM2/lib/commands/toolcontext.c	2006/08/31 22:21:00	1.42
@@ -646,8 +646,9 @@
 #endif
 
 #ifdef HAVE_LIBDL
-	/* Load any formats in shared libs */
-	if ((cn = find_config_tree_node(cmd, "global/format_libraries"))) {
+	/* Load any formats in shared libs if not static */
+	if (!cmd->is_static &&
+	    (cn = find_config_tree_node(cmd, "global/format_libraries"))) {
 
 		struct config_value *cv;
 		struct format_type *(*init_format_fn) (struct cmd_context *);
@@ -740,8 +741,9 @@
 #endif
 
 #ifdef HAVE_LIBDL
-	/* Load any formats in shared libs */
-	if ((cn = find_config_tree_node(cmd, "global/segment_libraries"))) {
+	/* Load any formats in shared libs unless static */
+	if (!cmd->is_static &&
+	    (cn = find_config_tree_node(cmd, "global/segment_libraries"))) {
 
 		struct config_value *cv;
 		struct segment_type *(*init_segtype_fn) (struct cmd_context *);
--- LVM2/lib/locking/locking.c	2006/08/21 12:54:52	1.31
+++ LVM2/lib/locking/locking.c	2006/08/31 22:21:00	1.32
@@ -134,24 +134,27 @@
 		return 1;
 
 	case 1:
+		log_very_verbose("File-based locking selected.");
 		if (!init_file_locking(&_locking, cmd))
 			break;
-		log_very_verbose("File-based locking enabled.");
 		return 1;
 
 #ifdef HAVE_LIBDL
 	case 2:
-		if (!init_external_locking(&_locking, cmd))
-			break;
-		log_very_verbose("External locking enabled.");
-		return 1;
+		if (!cmd->is_static) {
+			log_very_verbose("External locking selected.");
+			if (!init_external_locking(&_locking, cmd))
+				break;
+			return 1;
+		}
+		/* Fall through */
 #endif
 
 #ifdef CLUSTER_LOCKING_INTERNAL
 	case 3:
+		log_very_verbose("Cluster locking selected.");
 		if (!init_cluster_locking(&_locking, cmd))
 			break;
-		log_very_verbose("Cluster locking enabled.");
 		return 1;
 #endif
 
--- LVM2/lib/misc/sharedlib.c	2006/08/21 12:54:53	1.12
+++ LVM2/lib/misc/sharedlib.c	2006/08/31 22:21:00	1.13
@@ -17,6 +17,7 @@
 #include "config.h"
 #include "lvm-string.h"
 #include "sharedlib.h"
+#include "toolcontext.h"
 
 #include <limits.h>
 #include <sys/stat.h>
@@ -43,6 +44,12 @@
 	char path[PATH_MAX];
 	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));
 
 	log_very_verbose("Opening shared %s library %s", desc, path);


             reply	other threads:[~2006-08-31 22:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-31 22:21 agk [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-02-01 13:42 zkabelac
2012-01-11 20:38 agk
2011-01-06 15:29 zkabelac
2010-11-11 17:29 agk
2010-09-09 13:07 prajnoha
2010-08-11 12:14 prajnoha
2010-04-29  1:38 agk
2009-07-08 12:36 agk
2008-12-07  4:27 wysochanski
2007-07-28 12:26 meyering
2007-07-23 10:45 mbroz
2006-11-04  3:34 agk
2006-04-03 18:43 agk
2004-12-10 16:01 agk
2004-11-19 19:25 agk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060831222101.32372.qmail@sourceware.org \
    --to=agk@sourceware.org \
    --cc=lvm2-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).