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

[Cluster-devel] cluster/group/gfs_controld main.c plock.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2006-10-09 21:48:58

Modified files:
	group/gfs_controld: main.c plock.c 

Log message:
	add -p option to completely disable plocks/ckpts

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/main.c.diff?cvsroot=cluster&r1=1.15&r2=1.16
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/gfs_controld/plock.c.diff?cvsroot=cluster&r1=1.21&r2=1.22

--- cluster/group/gfs_controld/main.c	2006/10/06 14:43:58	1.15
+++ cluster/group/gfs_controld/main.c	2006/10/09 21:48:57	1.16
@@ -12,7 +12,7 @@
 
 #include "lock_dlm.h"
 
-#define OPTION_STRING			"DPhVw"
+#define OPTION_STRING			"DPhVwp"
 #define LOCKFILE_NAME			"/var/run/gfs_controld.pid"
 
 struct client {
@@ -35,6 +35,7 @@
 extern struct list_head mounts;
 extern struct list_head withdrawn_mounts;
 int no_withdraw;
+int no_plock;
 
 
 int do_write(int fd, void *buf, size_t count)
@@ -566,6 +567,10 @@
 			plock_debug_opt = 1;
 			break;
 
+		case 'p':
+			no_plock = 1;
+			break;
+
 		case 'h':
 			print_usage();
 			exit(EXIT_SUCCESS);
--- cluster/group/gfs_controld/plock.c	2006/10/06 15:34:52	1.21
+++ cluster/group/gfs_controld/plock.c	2006/10/09 21:48:57	1.22
@@ -47,6 +47,7 @@
 extern int our_nodeid;
 static int plocks_online = 0;
 extern int message_flow_control_on;
+extern int no_plock;
 
 static SaCkptHandleT ckpt_handle;
 static SaCkptCallbacksT callbacks = { 0, 0 };
@@ -275,12 +276,16 @@
 	SaAisErrorT err;
 	int rv;
 
+	if (no_plock)
+		goto control;
+
 	err = saCkptInitialize(&ckpt_handle, &callbacks, &version);
 	if (err == SA_AIS_OK)
 		plocks_online = 1;
 	else
 		log_error("ckpt init error %d - plocks unavailable", err);
 
+ control:
 	rv = open_control();
 	if (rv)
 		return rv;


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