[Ocfs2-commits] mfasheh commits r2443 - trunk/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Jun 28 16:08:30 CDT 2005


Author: mfasheh
Signed-off-by: manish
Date: 2005-06-28 14:04:16 -0500 (Tue, 28 Jun 2005)
New Revision: 2443

Modified:
   trunk/fs/ocfs2/heartbeat.c
   trunk/fs/ocfs2/heartbeat.h
   trunk/fs/ocfs2/ocfs2.h
   trunk/fs/ocfs2/vote.c
Log:
* un typedef ocfs2_node_map

Signed-off-by: manish



Modified: trunk/fs/ocfs2/heartbeat.c
===================================================================
--- trunk/fs/ocfs2/heartbeat.c	2005-06-28 18:30:02 UTC (rev 2442)
+++ trunk/fs/ocfs2/heartbeat.c	2005-06-28 19:04:16 UTC (rev 2443)
@@ -51,15 +51,15 @@
 #define OCFS2_HB_NODE_DOWN_PRI     (0x0000002)
 #define OCFS2_HB_NODE_UP_PRI	   OCFS2_HB_NODE_DOWN_PRI
 
-static inline void __ocfs2_node_map_set_bit(ocfs2_node_map *map,
+static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map,
 					    int bit);
-static inline void __ocfs2_node_map_clear_bit(ocfs2_node_map *map,
+static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map,
 					      int bit);
-static inline int __ocfs2_node_map_is_empty(ocfs2_node_map *map);
-static void __ocfs2_node_map_dup(ocfs2_node_map *target,
-				 ocfs2_node_map *from);
-static void __ocfs2_node_map_set(ocfs2_node_map *target,
-				 ocfs2_node_map *from);
+static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map);
+static void __ocfs2_node_map_dup(struct ocfs2_node_map *target,
+				 struct ocfs2_node_map *from);
+static void __ocfs2_node_map_set(struct ocfs2_node_map *target,
+				 struct ocfs2_node_map *from);
 
 void ocfs2_init_node_maps(ocfs2_super *osb)
 {
@@ -211,21 +211,21 @@
 
 /* special case -1 for now
  * TODO: should *really* make sure the calling func never passes -1!!  */
-void ocfs2_node_map_init(ocfs2_node_map *map)
+void ocfs2_node_map_init(struct ocfs2_node_map *map)
 {
 	map->num_nodes = OCFS2_NODE_MAP_MAX_NODES;
 	memset(map->map, 0, BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES) * 
 	       sizeof(unsigned long));
 }
 
-static inline void __ocfs2_node_map_set_bit(ocfs2_node_map *map,
+static inline void __ocfs2_node_map_set_bit(struct ocfs2_node_map *map,
 					    int bit)
 {
 	set_bit(bit, map->map);
 }
 
 void ocfs2_node_map_set_bit(ocfs2_super *osb,
-			    ocfs2_node_map *map,
+			    struct ocfs2_node_map *map,
 			    int bit)
 {
 	if (bit==-1)
@@ -236,14 +236,14 @@
 	spin_unlock(&osb->node_map_lock);
 }
 
-static inline void __ocfs2_node_map_clear_bit(ocfs2_node_map *map,
+static inline void __ocfs2_node_map_clear_bit(struct ocfs2_node_map *map,
 					      int bit)
 {
 	clear_bit(bit, map->map);
 }
 
 void ocfs2_node_map_clear_bit(ocfs2_super *osb,
-			      ocfs2_node_map *map,
+			      struct ocfs2_node_map *map,
 			      int bit)
 {
 	if (bit==-1)
@@ -255,7 +255,7 @@
 }
 
 int ocfs2_node_map_test_bit(ocfs2_super *osb,
-			    ocfs2_node_map *map,
+			    struct ocfs2_node_map *map,
 			    int bit)
 {
 	int ret;
@@ -269,7 +269,7 @@
 	return ret;
 }
 
-static inline int __ocfs2_node_map_is_empty(ocfs2_node_map *map)
+static inline int __ocfs2_node_map_is_empty(struct ocfs2_node_map *map)
 {
 	int bit;
 	bit = find_next_bit(map->map, map->num_nodes, 0);
@@ -279,7 +279,7 @@
 }
 
 int ocfs2_node_map_is_empty(ocfs2_super *osb,
-			    ocfs2_node_map *map)
+			    struct ocfs2_node_map *map)
 {
 	int ret;
 	BUG_ON(map->num_nodes == 0);
@@ -289,8 +289,8 @@
 	return ret;
 }
 
-static void __ocfs2_node_map_dup(ocfs2_node_map *target,
-				 ocfs2_node_map *from)
+static void __ocfs2_node_map_dup(struct ocfs2_node_map *target,
+				 struct ocfs2_node_map *from)
 {
 	BUG_ON(from->num_nodes == 0);
 	ocfs2_node_map_init(target);
@@ -299,10 +299,10 @@
 
 /* returns 1 if bit is the only bit set in target, 0 otherwise */
 int ocfs2_node_map_is_only(ocfs2_super *osb,
-			   ocfs2_node_map *target,
+			   struct ocfs2_node_map *target,
 			   int bit)
 {
-	ocfs2_node_map temp;
+	struct ocfs2_node_map temp;
 	int ret;
 
 	spin_lock(&osb->node_map_lock);
@@ -314,8 +314,8 @@
 	return ret;
 }
 
-static void __ocfs2_node_map_set(ocfs2_node_map *target,
-				 ocfs2_node_map *from)
+static void __ocfs2_node_map_set(struct ocfs2_node_map *target,
+				 struct ocfs2_node_map *from)
 {
 	int num_longs, i; 
 
@@ -355,7 +355,7 @@
 }
 
 int ocfs2_node_map_iterate(ocfs2_super *osb,
-			   ocfs2_node_map *map,
+			   struct ocfs2_node_map *map,
 			   int idx)
 {
 	int i = idx;

Modified: trunk/fs/ocfs2/heartbeat.h
===================================================================
--- trunk/fs/ocfs2/heartbeat.h	2005-06-28 18:30:02 UTC (rev 2442)
+++ trunk/fs/ocfs2/heartbeat.h	2005-06-28 19:04:16 UTC (rev 2443)
@@ -35,23 +35,23 @@
 
 /* node map functions - used to keep track of mounted and in-recovery
  * nodes. */
-void ocfs2_node_map_init(ocfs2_node_map *map);
+void ocfs2_node_map_init(struct ocfs2_node_map *map);
 int ocfs2_node_map_is_empty(ocfs2_super *osb,
-			    ocfs2_node_map *map);
+			    struct ocfs2_node_map *map);
 void ocfs2_node_map_set_bit(ocfs2_super *osb,
-			    ocfs2_node_map *map,
+			    struct ocfs2_node_map *map,
 			    int bit);
 void ocfs2_node_map_clear_bit(ocfs2_super *osb,
-			      ocfs2_node_map *map,
+			      struct ocfs2_node_map *map,
 			      int bit);
 int ocfs2_node_map_test_bit(ocfs2_super *osb,
-			    ocfs2_node_map *map,
+			    struct ocfs2_node_map *map,
 			    int bit);
 int ocfs2_node_map_iterate(ocfs2_super *osb,
-			   ocfs2_node_map *map,
+			   struct ocfs2_node_map *map,
 			   int idx);
 static inline int ocfs2_node_map_first_set_bit(ocfs2_super *osb,
-					       ocfs2_node_map *map)
+					       struct ocfs2_node_map *map)
 {
 	return ocfs2_node_map_iterate(osb, map, 0);
 }
@@ -61,7 +61,7 @@
 			      int num);
 /* returns 1 if bit is the only bit set in target, 0 otherwise */
 int ocfs2_node_map_is_only(ocfs2_super *osb,
-			   ocfs2_node_map *target,
+			   struct ocfs2_node_map *target,
 			   int bit);
 
 #endif /* OCFS2_HEARTBEAT_H */

Modified: trunk/fs/ocfs2/ocfs2.h
===================================================================
--- trunk/fs/ocfs2/ocfs2.h	2005-06-28 18:30:02 UTC (rev 2442)
+++ trunk/fs/ocfs2/ocfs2.h	2005-06-28 19:04:16 UTC (rev 2443)
@@ -65,11 +65,10 @@
 /* this limits us to 256 nodes
  * if we need more, we can do a kmalloc for the map */
 #define OCFS2_NODE_MAP_MAX_NODES    256
-typedef struct _ocfs2_node_map
-{
+struct ocfs2_node_map {
 	u16 num_nodes;
 	unsigned long map[BITS_TO_LONGS(OCFS2_NODE_MAP_MAX_NODES)];
-} ocfs2_node_map;
+};
 
 enum ocfs2_ast_action {
 	OCFS2_AST_INVALID = 0,
@@ -188,9 +187,9 @@
 	struct ocfs2_slot_info *slot_info;
 
 	spinlock_t node_map_lock;
-	ocfs2_node_map mounted_map;
-	ocfs2_node_map recovery_map;
-	ocfs2_node_map umount_map;
+	struct ocfs2_node_map mounted_map;
+	struct ocfs2_node_map recovery_map;
+	struct ocfs2_node_map umount_map;
 
 	u32 num_clusters;
 	u64 root_blkno;

Modified: trunk/fs/ocfs2/vote.c
===================================================================
--- trunk/fs/ocfs2/vote.c	2005-06-28 18:30:02 UTC (rev 2442)
+++ trunk/fs/ocfs2/vote.c	2005-06-28 19:04:16 UTC (rev 2443)
@@ -121,14 +121,14 @@
 };
 
 struct ocfs2_net_wait_ctxt {
-	struct list_head   n_list;
-	u32                n_response_id;
-	wait_queue_head_t  n_event;
-	ocfs2_node_map     n_node_map;
-	int                n_response; /* an agreggate response. 0 if
-					* all nodes are go, < 0 on any
-					* negative response from any
-					* node or network error. */
+	struct list_head        n_list;
+	u32                     n_response_id;
+	wait_queue_head_t       n_event;
+	struct ocfs2_node_map   n_node_map;
+	int                     n_response; /* an agreggate response. 0 if
+					     * all nodes are go, < 0 on any
+					     * negative response from any
+					     * node or network error. */
 	struct ocfs2_net_response_cb *n_callback;
 };
 



More information about the Ocfs2-commits mailing list