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

[Cluster-devel] cluster/group/dlm_controld action.c dlm_daemon ...



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland sourceware org	2006-10-24 16:16:31

Modified files:
	group/dlm_controld: action.c dlm_daemon.h main.c member_cman.c 

Log message:
	Clear out configfs dirs that we've created before exiting.
	Allows dlm kernel mod can be removed straight away now.
	bz 211924
	(code setting scheduler priority also added but commented out)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/dlm_controld/action.c.diff?cvsroot=cluster&r1=1.7&r2=1.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/dlm_controld/dlm_daemon.h.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/dlm_controld/main.c.diff?cvsroot=cluster&r1=1.5&r2=1.6
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/group/dlm_controld/member_cman.c.diff?cvsroot=cluster&r1=1.3&r2=1.4

--- cluster/group/dlm_controld/action.c	2006/10/05 07:52:50	1.7
+++ cluster/group/dlm_controld/action.c	2006/10/24 16:16:31	1.8
@@ -522,6 +522,7 @@
 {
 	clear_configfs_comms();
 	clear_configfs_spaces();
+	rmdir("/sys/kernel/config/dlm/cluster");
 }
 
 int add_configfs_node(int nodeid, char *addr, int addrlen, int local)
--- cluster/group/dlm_controld/dlm_daemon.h	2006/10/05 07:52:50	1.4
+++ cluster/group/dlm_controld/dlm_daemon.h	2006/10/24 16:16:31	1.5
@@ -38,6 +38,7 @@
 #include <unistd.h>
 #include <time.h>
 #include <syslog.h>
+#include <sched.h>
 #include <linux/netlink.h>
 
 #include "list.h"
--- cluster/group/dlm_controld/main.c	2006/08/31 18:17:00	1.5
+++ cluster/group/dlm_controld/main.c	2006/10/24 16:16:31	1.6
@@ -252,10 +252,12 @@
 			if (pollfd[i].revents & POLLHUP) {
 				if (pollfd[i].fd == member_fd) {
 					log_error("cluster is down, exiting");
+					clear_configfs();
 					exit(1);
 				}
 				if (pollfd[i].fd == groupd_fd) {
 					log_error("groupd is down, exiting");
+					clear_configfs();
 					exit(1);
 				}
 				log_debug("closing fd %d", pollfd[i].fd);
@@ -387,6 +389,26 @@
 	}
 }
 
+#if 0
+void set_scheduler(void)
+{
+	struct sched_param sched_param;
+	int rv;
+
+	rv = sched_get_priority_max(SCHED_RR);
+	if (rv != -1) {
+		sched_param.sched_priority = 2;
+		rv = sched_setscheduler(0, SCHED_RR, &sched_param);
+		if (rv == -1)
+			log_error("could not set SCHED_RR priority %d err %d",
+				   sched_param.sched_priority, errno);
+	} else {
+		log_error("could not get maximum scheduler priority err %d",
+			  errno);
+	}
+}
+#endif
+
 int main(int argc, char **argv)
 {
 	prog_name = argv[0];
@@ -398,6 +420,10 @@
 	if (!daemon_debug_opt)
 		daemonize();
 
+#if 0
+	set_scheduler();
+#endif
+
 	return loop();
 }
 
--- cluster/group/dlm_controld/member_cman.c	2006/10/05 07:52:50	1.3
+++ cluster/group/dlm_controld/member_cman.c	2006/10/24 16:16:31	1.4
@@ -165,6 +165,7 @@
 		/* do we want to try to forcibly clean some stuff up
 		   in the kernel here? */
 		log_error("cluster is down, exiting");
+		clear_configfs();
 		exit(1);
 	}
 	return 0;


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