[Ocfs2-commits] mfasheh commits r1886 - trunk/fs/ocfs2/dlm

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Feb 4 16:42:37 CST 2005


Author: mfasheh
Date: 2005-02-04 16:42:35 -0600 (Fri, 04 Feb 2005)
New Revision: 1886

Modified:
   trunk/fs/ocfs2/dlm/dlmmaster.c
   trunk/fs/ocfs2/dlm/dlmmod.h
Log:
* use a named enum for dlm_master_list_entry->type so we get
  typechecking.



Modified: trunk/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmaster.c	2005-02-02 22:59:02 UTC (rev 1885)
+++ trunk/fs/ocfs2/dlm/dlmmaster.c	2005-02-04 22:42:35 UTC (rev 1886)
@@ -57,8 +57,9 @@
 atomic_t dlm_num_resources = ATOMIC_INIT(0);
 
 
-static int dlm_init_mle(dlm_master_list_entry *mle, int type, dlm_ctxt *dlm, 
-			 dlm_lock_resource *res, struct qstr *name, int locked);
+static int dlm_init_mle(dlm_master_list_entry *mle, enum dlm_mle_type type,
+                       dlm_ctxt *dlm, dlm_lock_resource *res,
+                       struct qstr *name, int locked);
 static void dlm_put_mle(dlm_master_list_entry *mle);
 static int dlm_do_master_request_resp(dlm_ctxt *dlm, struct qstr *name, 
 			       int response, int to);
@@ -91,8 +92,9 @@
 
 
 
-static int dlm_init_mle(dlm_master_list_entry *mle, int type, dlm_ctxt *dlm, 
-			 dlm_lock_resource *res, struct qstr *name, int locked)
+static int dlm_init_mle(dlm_master_list_entry *mle, enum dlm_mle_type type,
+			dlm_ctxt *dlm, dlm_lock_resource *res,
+			struct qstr *name, int locked)
 {
 	int ret = 0;
 	

Modified: trunk/fs/ocfs2/dlm/dlmmod.h
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmod.h	2005-02-02 22:59:02 UTC (rev 1885)
+++ trunk/fs/ocfs2/dlm/dlmmod.h	2005-02-04 22:42:35 UTC (rev 1886)
@@ -271,7 +271,7 @@
 	char lvb[DLM_LVB_LEN];
 };
 
-enum {
+enum dlm_mle_type {
 	DLM_MLE_BLOCK,
 	DLM_MLE_MASTER
 };
@@ -297,7 +297,7 @@
 	unsigned long node_map[BITS_TO_LONGS(NM_MAX_NODES)];
 	u8 master;
 	u8 error;
-	u8 type;    // BLOCK or MASTER
+	enum dlm_mle_type type;    // BLOCK or MASTER
 	union {
 		dlm_lock_resource *res;
 		dlm_lock_name name;



More information about the Ocfs2-commits mailing list