cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/group/dlm_controld action.c dlm_daemon ...
Date: 24 Oct 2006 16:16:32 -0000	[thread overview]
Message-ID: <20061024161632.16951.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	teigland at 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;



             reply	other threads:[~2006-10-24 16:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-24 16:16 teigland [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-05-04 21:14 [Cluster-devel] cluster/group/dlm_controld action.c dlm_daemon teigland
2007-05-04 21:05 teigland
2007-04-23 15:31 teigland
2007-04-23 15:24 teigland
2007-01-09 19:18 teigland
2007-01-09 19:17 teigland
2006-10-05  7:52 pcaulfield

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=20061024161632.16951.qmail@sourceware.org \
    --to=teigland@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 NNTP newsgroup(s).