[SSI] openssi/kernel/cluster/ssi/ipc namesvr_clnt.c,1.9,1.10

Roger Tsang <[email protected]> Mon, 29 Mar 2010 06:25:01 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/ipc
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv19023/kernel/cluster/ssi/ipc

Modified Files:
      Tag: OPENSSI-FC
	namesvr_clnt.c 
Log Message:
IPC:
- Fix various functions doing clms_waitfor_key_service() for service 0 which may not be IPC.


Index: namesvr_clnt.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/ipc/namesvr_clnt.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- namesvr_clnt.c	5 Mar 2010 06:25:36 -0000	1.9
+++ namesvr_clnt.c	29 Mar 2010 06:24:59 -0000	1.10
@@ -43,6 +43,7 @@
 clusternode_t	name_server_node;
 
 extern int ipcname_failover_flag;
+extern clms_key_svc_t ipc_key_service;
 
 extern int ipcname_getid(int service, key_t key, int in_flag,
 	       	global_id_t *glid, clusternode_t *server, int view, int *size);
@@ -74,7 +75,6 @@
 	u_long		newid;
 	clusternode_t	server_node;
 	int		status, rval;
-	extern clms_key_svc_t ipc_key_service;
 
 again:
 	server_node = name_server_node;
@@ -103,7 +103,8 @@
 		if (status == -EAGAIN || status == -EREMOTE) {
 					/* Server is doing failover,
 					   dying, or isn't ready yet. */
-			clms_waitfor_key_service(0);
+			idelay(HZ/10);
+			clms_waitfor_key_service(ipc_key_service);
 			goto again;
 		}
 
@@ -133,7 +134,7 @@
 
 	if (server_node == this_node) {
 		if(ipcname_failover_flag)
-			clms_waitfor_key_service(0);
+			clms_waitfor_key_service(ipc_key_service);
 		status = ipcname_rmid(service, glid, 1);
 	}
 	else {
@@ -142,7 +143,8 @@
  		if (status == -EAGAIN || status == -EREMOTE) {
  					/* Server is doing failover,
 					   dying, or isn't ready yet. */
-			clms_waitfor_key_service(0);
+			idelay(HZ/10);
+			clms_waitfor_key_service(ipc_key_service);
 			goto again;
 		}
 		if (rval && !status)
@@ -159,7 +161,6 @@
 	int		status = -EINVAL;
 	clusternode_t	server_node;
 	int 		rval;
-	extern clms_key_svc_t ipc_key_service;
 again:
 	server_node = name_server_node;
 	if (server_node == this_node) {
@@ -174,7 +175,8 @@
 		if (status == -EAGAIN || status == -EREMOTE) {
 					/* Server is doing failover,
 					   dying, or isn't ready yet. */
-			clms_waitfor_key_service(0);
+			idelay(HZ/10);
+			clms_waitfor_key_service(ipc_key_service);
 			goto again;
 		}
 
@@ -189,7 +191,6 @@
 {
 	clusternode_t	server_node;
 	int rval;
-	extern clms_key_svc_t ipc_key_service;
 again:
 	server_node = name_server_node;
 #ifdef TEST_IPC
@@ -211,7 +212,8 @@
 						node_id_pairs, &count, sz);
 		if (status == -EAGAIN || status == -EREMOTE) {
 			/* Server is doing failover,dying, or isn't ready yet.*/
-			clms_waitfor_key_service(0);
+			idelay(HZ/10);
+			clms_waitfor_key_service(ipc_key_service);
 			goto again;
 		}
 	}
@@ -256,7 +258,7 @@
 
 	if (server_node == this_node) {
 		if(ipcname_failover_flag)
-			clms_waitfor_key_service(0);
+			clms_waitfor_key_service(ipc_key_service);
 		if (nentries > STACK_IDS)
 			id_array = (int *)kzmalloc_nofail(nentries * sizeof(int));
 		else
@@ -278,7 +280,8 @@
  		if (error == -EAGAIN || error == -EREMOTE) {
  					/* Server is doing failover,
 					   dying, or isn't ready yet. */
-			clms_waitfor_key_service(0);
+			idelay(HZ/10);
+			clms_waitfor_key_service(ipc_key_service);
 			goto again;
 		}
 	}


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev