[Ocfs2-commits] mfasheh commits r2349 - trunk/fs/ocfs2/cluster

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Jun 1 17:33:47 CDT 2005


Author: mfasheh
Signed-off-by: zab
Date: 2005-06-01 17:33:46 -0500 (Wed, 01 Jun 2005)
New Revision: 2349

Modified:
   trunk/fs/ocfs2/cluster/tcp.c
   trunk/fs/ocfs2/cluster/tcp.h
   trunk/fs/ocfs2/cluster/tcp_internal.h
Log:
* put the o2net_system_error stuff in a more reasonable place.

Signed-off-by: zab



Modified: trunk/fs/ocfs2/cluster/tcp.c
===================================================================
--- trunk/fs/ocfs2/cluster/tcp.c	2005-06-01 22:07:51 UTC (rev 2348)
+++ trunk/fs/ocfs2/cluster/tcp.c	2005-06-01 22:33:46 UTC (rev 2349)
@@ -129,6 +129,23 @@
 /* XXX someday we'll need better accounting */
 static struct task_struct *o2net_recv_task = NULL;
 
+static int o2net_sys_err_translations[O2NET_ERR_MAX] =
+		{[O2NET_ERR_NONE]	= 0,
+		 [O2NET_ERR_NO_HNDLR]	= -ENOPROTOOPT,
+		 [O2NET_ERR_OVERFLOW]	= -EOVERFLOW,
+		 [O2NET_ERR_DIED]	= -EHOSTDOWN,};
+
+static inline int o2net_sys_err_to_errno(enum o2net_system_error err)
+{
+	int trans;
+	BUG_ON(err >= O2NET_ERR_MAX);
+	trans = o2net_sys_err_translations[err];
+
+	/* Just in case we mess up the translation table above */
+	BUG_ON(err != O2NET_ERR_NONE && trans == 0);
+	return trans;
+}
+
 /////////////////////
 static struct socket *o2net_init_tcp_recv_sock(u16 port);
 static int o2net_receive_thread(void *data);

Modified: trunk/fs/ocfs2/cluster/tcp.h
===================================================================
--- trunk/fs/ocfs2/cluster/tcp.h	2005-06-01 22:07:51 UTC (rev 2348)
+++ trunk/fs/ocfs2/cluster/tcp.h	2005-06-01 22:33:46 UTC (rev 2349)
@@ -43,31 +43,6 @@
  */
 #include "nodemanager.h"
 
-enum o2net_system_error {
-	O2NET_ERR_NONE = 0,
-	O2NET_ERR_NO_HNDLR,
-	O2NET_ERR_OVERFLOW,
-	O2NET_ERR_DIED,
-	O2NET_ERR_MAX
-};
-
-static int o2net_sys_err_translations[O2NET_ERR_MAX] =
-		{[O2NET_ERR_NONE] = 0,
-		 [O2NET_ERR_NO_HNDLR] = -ENOPROTOOPT,
-		 [O2NET_ERR_OVERFLOW]  = -EOVERFLOW,
-		 [O2NET_ERR_DIED] = -EHOSTDOWN,};
-
-static inline int o2net_sys_err_to_errno(enum o2net_system_error err)
-{
-	int trans;
-	BUG_ON(err >= O2NET_ERR_MAX);
-	trans = o2net_sys_err_translations[err];
-
-	/* Just in case we mess up the translation table above */
-	BUG_ON(err != O2NET_ERR_NONE && trans == 0);
-	return trans;
-}
-
 #define O2NET_MSG_MAGIC           ((u16)0xfa55)
 #define O2NET_MSG_STATUS_MAGIC    ((u16)0xfa56)
 typedef struct _o2net_msg

Modified: trunk/fs/ocfs2/cluster/tcp_internal.h
===================================================================
--- trunk/fs/ocfs2/cluster/tcp_internal.h	2005-06-01 22:07:51 UTC (rev 2348)
+++ trunk/fs/ocfs2/cluster/tcp_internal.h	2005-06-01 22:33:46 UTC (rev 2349)
@@ -59,6 +59,14 @@
 	struct list_head	nh_unregister_item;
 };
 
+enum o2net_system_error {
+	O2NET_ERR_NONE = 0,
+	O2NET_ERR_NO_HNDLR,
+	O2NET_ERR_OVERFLOW,
+	O2NET_ERR_DIED,
+	O2NET_ERR_MAX
+};
+
 struct o2net_status_wait {
 	enum o2net_system_error	ns_sys_status;
 	s32			ns_status;



More information about the Ocfs2-commits mailing list