Skip to contentSkip to conversation

Cluster Project branch, master, updated. cluster-2.99.00-10-gf0cc81b

Cluster-devel [email protected] 1 participant 1 message Apr 30, 2008

lore
Share & tools
lore
#0 lore raw

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=f0cc81be7ea17b3d53916c150bb8d4231511b2fa

The branch, master has been updated

       via  f0cc81be7ea17b3d53916c150bb8d4231511b2fa (commit)
      from  af2b1a3e3430a1e11b29a0ef6c34332c4176797e (commit)

Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.

- Log ----------------------------------------------------------------- commit f0cc81be7ea17b3d53916c150bb8d4231511b2fa

Author: David Teigland <[email protected]>
Date:   Wed Apr 30 11:59:44 2008 -0500

libdlmcontrol: filling out code

-----------------------------------------------------------------------

Summary of changes:

 dlm/libdlmcontrol/libdlmcontrol.h |   13 +------
 dlm/libdlmcontrol/main.c          |   74 +++++++++++++++++++++++++++++++++++++
 dlm/tool/main.c                   |    2 +-
 group/dlm_controld/dlm_controld.h |    2 +-
 group/dlm_controld/main.c         |   15 ++++---
 5 files changed, 86 insertions(+), 20 deletions(-)
dlm/libdlmcontrol/libdlmcontrol.h +1 -12
index 69eee26..117e20e 100644
@@ -46,24 +46,13 @@ int dlmc_lockspace_info(char *name, struct dlmc_lockspace *ls);
 int dlmc_lockspace_nodes(char *name, int type, int max, int *count,
 			 struct dlmc_node *nodes);
 
-/* returns a local unix socket connected to dlm_controld */
 int dlmc_fs_connect(void);
-
-/* closes the unix socket */
 void dlmc_fs_disconnect(int fd);
-
-/* writes to fd: REGISTER + name */
 int dlmc_fs_register(int fd, char *name);
-
-/* writes to fd: UNREGISTER + name */
 int dlmc_fs_unregister(int fd, char *name);
-
-/* writes to fd: NOTIFIED + name + nodeid */
 int dlmc_fs_notified(int fd, char *name, int nodeid);
-
-/* reads from fd: gets name, REGISTER/NOTIFIED, nodeid, result */
 int dlmc_fs_result(int fd, char *name, int *type, int *nodeid, int *result);
 
-int dlmc_deadlk_check(char *name);
+int dlmc_deadlock_check(char *name);
 
 #endif
dlm/libdlmcontrol/main.c +74 -0

77 lines not on this page · raw message

dlm/tool/main.c +1 -1
index fcd6b35..ed1b21d 100644
@@ -395,7 +395,7 @@ void do_spaces(void)
 
 static void do_deadlock_check(char *name)
 {
-	/* dlmc_deadlk_check(name); */
+	dlmc_deadlock_check(name);
 }
 
 int main(int argc, char **argv)
group/dlm_controld/dlm_controld.h +1 -1
index 8b18983..079a8bc 100644
@@ -30,7 +30,7 @@
 #define DLMC_CMD_FS_REGISTER		6
 #define DLMC_CMD_FS_UNREGISTER		7
 #define DLMC_CMD_FS_NOTIFIED		8
-#define DLMC_CMD_DEADLK_CHECK		9
+#define DLMC_CMD_DEADLOCK_CHECK		9
 
 struct dlmc_header {
 	unsigned int magic;
group/dlm_controld/main.c +9 -6
index 5646df1..30c2c14 100644
@@ -388,6 +388,7 @@ static void process_connection(int ci)
 	struct dlmc_header h;
 	char *extra = NULL;
 	int rv, extra_len;
+	struct lockspace *ls;
 
 	rv = do_read(client[ci].fd, &h, sizeof(h));
 	if (rv < 0) {
@@ -423,20 +424,21 @@ static void process_connection(int ci)
 
 	switch (h.command) {
 	case DLMC_CMD_FS_REGISTER:
+		/* TODO */
 		break;
 
 	case DLMC_CMD_FS_UNREGISTER:
+		/* TODO */
 		break;
 
 	case DLMC_CMD_FS_NOTIFIED:
+		/* TODO */
 		break;
 
-	case DLMC_CMD_DEADLK_CHECK:
-#if 0
-		ls = find_ls(hd.name);
+	case DLMC_CMD_DEADLOCK_CHECK:
+		ls = find_ls(h.name);
 		if (ls)
 			send_cycle_start(ls);
-#endif
 		break;
 
 	case DLMC_CMD_DUMP_DEBUG:
@@ -543,7 +545,7 @@ static void *process_queries(void *arg)
 			goto out;
 		}
 
-		pthread_mutex_lock(&query_mutex);
+		query_lock();
 
 		switch (h.command) {
 		case DLMC_CMD_DUMP_DEBUG:
@@ -564,7 +566,7 @@ static void *process_queries(void *arg)
 		default:
 			break;
 		}
-		pthread_mutex_unlock(&query_mutex);
+		query_unlock();
 
  out:
 		close(f);
@@ -697,6 +699,7 @@ static int loop(void)
 			goto out;
 		}
 
+		/* FIXME: lock/unlock around operations that take a while */
 		query_lock();
 
 		for (i = 0; i <= client_maxi; i++) {

hooks/post-receive
--
Cluster Project