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

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


Author: mfasheh
Signed-off-by: jlbec
Date: 2005-06-28 13:30:02 -0500 (Tue, 28 Jun 2005)
New Revision: 2442

Modified:
   trunk/fs/ocfs2/aio.c
   trunk/fs/ocfs2/alloc.c
   trunk/fs/ocfs2/alloc.h
   trunk/fs/ocfs2/dlmglue.c
   trunk/fs/ocfs2/file.c
   trunk/fs/ocfs2/inode.c
   trunk/fs/ocfs2/journal.c
   trunk/fs/ocfs2/mmap.c
   trunk/fs/ocfs2/mmap.h
   trunk/fs/ocfs2/ocfs2.h
   trunk/fs/ocfs2/slot_map.c
   trunk/fs/ocfs2/slot_map.h
   trunk/fs/ocfs2/vote.c
Log:
* Remove a large number of typedefs. There's still more to go as folks
  have time.

Signed-off-by: jlbec



Modified: trunk/fs/ocfs2/aio.c
===================================================================
--- trunk/fs/ocfs2/aio.c	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/aio.c	2005-06-28 18:30:02 UTC (rev 2442)
@@ -48,13 +48,13 @@
 
 
 struct ocfs2_kiocb_private {
-	struct ocfs2_kiocb_private *kp_teardown_next;
-	ocfs2_super		*kp_osb;
-	unsigned		kp_have_alloc_sem:1,
-				kp_have_write_locks:1;
-	struct inode		*kp_inode;
-	ocfs2_buffer_lock_ctxt	kp_ctxt;
-	struct ocfs2_write_lock_info kp_info;
+	struct ocfs2_kiocb_private	*kp_teardown_next;
+	ocfs2_super			*kp_osb;
+	unsigned			kp_have_alloc_sem:1,
+					kp_have_write_locks:1;
+	struct inode			*kp_inode;
+	struct ocfs2_buffer_lock_ctxt	kp_ctxt;
+	struct ocfs2_write_lock_info	kp_info;
 };
 
 static void okp_teardown(struct ocfs2_kiocb_private *okp)
@@ -219,7 +219,7 @@
 	struct ocfs2_kiocb_private *okp = iocb->private;
 	struct file *filp = iocb->ki_filp;
 	struct inode *inode = filp->f_dentry->d_inode;
-	ocfs2_backing_inode *target_binode;
+	struct ocfs2_backing_inode *target_binode;
 	ssize_t ret;
 
 	mlog(0, "iocb %p okp %p\n", iocb, okp);

Modified: trunk/fs/ocfs2/alloc.c
===================================================================
--- trunk/fs/ocfs2/alloc.c	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/alloc.c	2005-06-28 18:30:02 UTC (rev 2442)
@@ -1451,7 +1451,7 @@
 			    struct buffer_head *fe_bh,
 			    struct buffer_head *old_last_eb_bh,
 			    ocfs2_journal_handle *handle,
-			    ocfs2_truncate_context *tc)
+			    struct ocfs2_truncate_context *tc)
 {
 	int status, i, depth;
 	ocfs2_dinode *fe;
@@ -1658,7 +1658,7 @@
 int ocfs2_commit_truncate(ocfs2_super *osb,
 			  struct inode *inode,
 			  struct buffer_head *fe_bh,
-			  ocfs2_truncate_context *tc)
+			  struct ocfs2_truncate_context *tc)
 {
 	int status, i, credits, tl_sem = 0;
 	unsigned int clusters_to_del, target_i_clusters;
@@ -1816,7 +1816,7 @@
 int ocfs2_prepare_truncate(ocfs2_super *osb, 
 			   struct inode *inode, 
 			   struct buffer_head *fe_bh, 
-			   ocfs2_truncate_context **tc)
+			   struct ocfs2_truncate_context **tc)
 {
 	int status, metadata_delete;
 	unsigned int new_i_clusters;
@@ -1840,7 +1840,7 @@
 
 	BUG_ON(fe->i_clusters <= new_i_clusters);
 
-	*tc = kcalloc(1, sizeof(ocfs2_truncate_context), GFP_KERNEL);
+	*tc = kcalloc(1, sizeof(struct ocfs2_truncate_context), GFP_KERNEL);
 	if (!(*tc)) {
 		status = -ENOMEM;
 		mlog_errno(status);
@@ -1903,7 +1903,7 @@
 	return status;
 }
 
-void ocfs2_free_truncate_context(ocfs2_truncate_context *tc)
+void ocfs2_free_truncate_context(struct ocfs2_truncate_context *tc)
 {
 	if (tc->tc_ext_alloc_inode) {
 		if (tc->tc_ext_alloc_locked)

Modified: trunk/fs/ocfs2/alloc.h
===================================================================
--- trunk/fs/ocfs2/alloc.h	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/alloc.h	2005-06-28 18:30:02 UTC (rev 2442)
@@ -62,23 +62,23 @@
 int ocfs2_complete_truncate_log_recovery(ocfs2_super *osb,
 					 ocfs2_dinode *tl_copy);
 
-typedef struct _ocfs2_truncate_context {
+struct ocfs2_truncate_context {
 	struct inode *tc_ext_alloc_inode;
 	struct buffer_head *tc_ext_alloc_bh;
 	int tc_ext_alloc_locked; /* is it cluster locked? */
 	/* these get destroyed once it's passed to ocfs2_commit_truncate. */
 	struct buffer_head *tc_last_eb_bh;
-} ocfs2_truncate_context;
+};
 
-void ocfs2_free_truncate_context(ocfs2_truncate_context *tc);
+void ocfs2_free_truncate_context(struct ocfs2_truncate_context *tc);
 
 int ocfs2_prepare_truncate(ocfs2_super *osb, 
 			   struct inode *inode, 
 			   struct buffer_head *fe_bh, 
-			   ocfs2_truncate_context **tc);
+			   struct ocfs2_truncate_context **tc);
 int ocfs2_commit_truncate(ocfs2_super *osb,
 			  struct inode *inode,
 			  struct buffer_head *fe_bh,
-			  ocfs2_truncate_context *tc);
+			  struct ocfs2_truncate_context *tc);
 
 #endif /* OCFS2_ALLOC_H */

Modified: trunk/fs/ocfs2/dlmglue.c
===================================================================
--- trunk/fs/ocfs2/dlmglue.c	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/dlmglue.c	2005-06-28 18:30:02 UTC (rev 2442)
@@ -1677,7 +1677,7 @@
 	int level = ex ? LKM_EXMODE : LKM_PRMODE;
 	struct ocfs2_lock_res *lockres = &osb->osb_super_lockres;
 	struct buffer_head *bh;
-	ocfs2_slot_info *si = osb->slot_info;
+	struct ocfs2_slot_info *si = osb->slot_info;
 
 	mlog_entry_void();
 

Modified: trunk/fs/ocfs2/file.c
===================================================================
--- trunk/fs/ocfs2/file.c	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/file.c	2005-06-28 18:30:02 UTC (rev 2442)
@@ -252,7 +252,7 @@
 	ocfs2_super *osb = NULL;
 	struct dentry *dentry = filp->f_dentry;
 	struct inode *inode = dentry->d_inode;
-	ocfs2_backing_inode *target_binode;
+	struct ocfs2_backing_inode *target_binode;
 	DECLARE_BUFFER_LOCK_CTXT(ctxt);
 
 	mlog_entry("(0x%p, 0x%p, %u, '%.*s')\n", filp, buf,
@@ -451,7 +451,7 @@
 	ocfs2_dinode *fe = NULL;
 	struct buffer_head *fe_bh = NULL;
 	ocfs2_journal_handle *handle = NULL;
-	ocfs2_truncate_context *tc = NULL;
+	struct ocfs2_truncate_context *tc = NULL;
 
 	mlog_entry("(inode = %"MLFu64", new_i_size = %"MLFu64"\n", 
 		   OCFS2_I(inode)->ip_blkno, new_i_size);

Modified: trunk/fs/ocfs2/inode.c
===================================================================
--- trunk/fs/ocfs2/inode.c	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/inode.c	2005-06-28 18:30:02 UTC (rev 2442)
@@ -393,7 +393,7 @@
 {
 	int status = 0;
 	ocfs2_journal_handle *handle = NULL;
-	ocfs2_truncate_context *tc = NULL;
+	struct ocfs2_truncate_context *tc = NULL;
 	ocfs2_dinode *fe;
 
 	mlog_entry_void();

Modified: trunk/fs/ocfs2/journal.c
===================================================================
--- trunk/fs/ocfs2/journal.c	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/journal.c	2005-06-28 18:30:02 UTC (rev 2442)
@@ -1202,7 +1202,7 @@
 {
 	int status = 0;
 	int slot_num;
-	ocfs2_slot_info *si = osb->slot_info;
+	struct ocfs2_slot_info *si = osb->slot_info;
 	ocfs2_dinode *la_copy = NULL;
 	ocfs2_dinode *tl_copy = NULL;
 
@@ -1309,7 +1309,7 @@
 int ocfs2_mark_dead_nodes(ocfs2_super *osb)
 {
 	int status, i, node_num;
-	ocfs2_slot_info *si = osb->slot_info;
+	struct ocfs2_slot_info *si = osb->slot_info;
 
 	/* This is called with the super block cluster lock, so we
 	 * know that the slot map can't change underneath us. */

Modified: trunk/fs/ocfs2/mmap.c
===================================================================
--- trunk/fs/ocfs2/mmap.c	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/mmap.c	2005-06-28 18:30:02 UTC (rev 2442)
@@ -42,17 +42,17 @@
 #include "inode.h"
 #include "mmap.h"
 
-static inline u64 ocfs2_binode_blkno(ocfs2_backing_inode *binode);
+static inline u64 ocfs2_binode_blkno(struct ocfs2_backing_inode *binode);
 static inline struct rb_node * __ocfs2_buffer_lock_ctxt_root(
-	ocfs2_buffer_lock_ctxt *ctxt);
-static int ocfs2_buffer_lock_ctxt_insert(ocfs2_buffer_lock_ctxt *ctxt,
+	struct ocfs2_buffer_lock_ctxt *ctxt);
+static int ocfs2_buffer_lock_ctxt_insert(struct ocfs2_buffer_lock_ctxt *ctxt,
 					 struct inode *inode,
-					 ocfs2_backing_inode **binode_ret);
+					 struct ocfs2_backing_inode **binode_ret);
 static int ocfs2_fill_ctxt_from_buf(struct super_block *sb,
 				    struct inode *target_inode,
 				    char __user *buf,
 				    size_t size,
-				    ocfs2_buffer_lock_ctxt *ctxt);
+				    struct ocfs2_buffer_lock_ctxt *ctxt);
 
 static struct page *ocfs2_nopage(struct vm_area_struct * area,
 				 unsigned long address,
@@ -164,7 +164,7 @@
 	return 0;
 }
 
-static inline u64 ocfs2_binode_blkno(ocfs2_backing_inode *binode)
+static inline u64 ocfs2_binode_blkno(struct ocfs2_backing_inode *binode)
 {
 	struct inode *inode = binode->ba_inode;
 
@@ -174,17 +174,17 @@
 }
 
 static inline struct rb_node * __ocfs2_buffer_lock_ctxt_root(
-	ocfs2_buffer_lock_ctxt *ctxt)
+	struct ocfs2_buffer_lock_ctxt *ctxt)
 {
 	return ctxt->b_inodes.rb_node;
 }
 
-static int ocfs2_buffer_lock_ctxt_insert(ocfs2_buffer_lock_ctxt *ctxt,
+static int ocfs2_buffer_lock_ctxt_insert(struct ocfs2_buffer_lock_ctxt *ctxt,
 					 struct inode *inode,
-					 ocfs2_backing_inode **binode_ret)
+					 struct ocfs2_backing_inode **binode_ret)
 {
 	u64 blkno;
-	ocfs2_backing_inode *tmp, *binode;
+	struct ocfs2_backing_inode *tmp, *binode;
 	struct rb_node * parent = NULL;
 	struct rb_node ** p = &ctxt->b_inodes.rb_node;
 
@@ -195,7 +195,7 @@
 
 	while(*p) {
 		parent = *p;
-		tmp = rb_entry(parent, ocfs2_backing_inode, ba_node);
+		tmp = rb_entry(parent, struct ocfs2_backing_inode, ba_node);
 
 		if (blkno < ocfs2_binode_blkno(tmp))
 			p = &(*p)->rb_left;
@@ -205,7 +205,7 @@
 			return 0; /* Don't insert duplicates */
 	}
 
-	binode = kcalloc(1, sizeof(ocfs2_backing_inode), GFP_KERNEL);
+	binode = kcalloc(1, sizeof(struct ocfs2_backing_inode), GFP_KERNEL);
 	if (!binode)
 		return -ENOMEM;
 	binode->ba_inode = inode;
@@ -224,7 +224,7 @@
 				    struct inode *target_inode,
 				    char __user *buf,
 				    size_t size,
-				    ocfs2_buffer_lock_ctxt *ctxt)
+				    struct ocfs2_buffer_lock_ctxt *ctxt)
 {
 	int status;
 	unsigned long start = (unsigned long)buf;
@@ -259,8 +259,8 @@
 			 struct inode *target_inode,
 			 char __user *buf,
 			 size_t size,
-			 ocfs2_buffer_lock_ctxt *ctxt,
-			 ocfs2_backing_inode **target_binode)
+			 struct ocfs2_buffer_lock_ctxt *ctxt,
+			 struct ocfs2_backing_inode **target_binode)
 {
 	struct mm_struct *mm = current->mm;
 	int skip_sem = (current->flags & PF_DUMPCORE) || !mm;
@@ -308,11 +308,12 @@
 /* starting from pos, which can be null for the first call, give the
  * next buffer that needs unlocking.  we return null when there are none
  * left or we see last_inode */
-static ocfs2_backing_inode *ocfs2_next_unlocked(ocfs2_buffer_lock_ctxt *ctxt,
-						struct inode *last_inode,
-						ocfs2_backing_inode *pos)
+static struct ocfs2_backing_inode *
+ocfs2_next_unlocked(struct ocfs2_buffer_lock_ctxt *ctxt,
+		    struct inode *last_inode,
+		    struct ocfs2_backing_inode *pos)
 {
-	ocfs2_backing_inode *binode = NULL;
+	struct ocfs2_backing_inode *binode = NULL;
 	struct rb_node *node = NULL;
 
 	if (pos == NULL) {
@@ -324,7 +325,7 @@
 		node = rb_next(&pos->ba_node);
 
 	if (node)
-		binode = rb_entry(node, ocfs2_backing_inode, ba_node);
+		binode = rb_entry(node, struct ocfs2_backing_inode, ba_node);
 
 	if (binode && last_inode && binode->ba_inode == last_inode)
 		binode = NULL;
@@ -347,11 +348,11 @@
 /* WARNING: If you get a failure case here, you *must* call
  * "ocfs2_unlock_buffer_inodes" as we may have left a few inodes under
  * cluster lock. */
-int ocfs2_lock_buffer_inodes(ocfs2_buffer_lock_ctxt *ctxt,
+int ocfs2_lock_buffer_inodes(struct ocfs2_buffer_lock_ctxt *ctxt,
 			     struct inode *last_inode)
 {
 	int status, data_level;
-	ocfs2_backing_inode *binode = NULL;
+	struct ocfs2_backing_inode *binode = NULL;
 	struct inode *inode;
 
 	while((binode = ocfs2_next_unlocked(ctxt, last_inode, binode))) {
@@ -403,9 +404,9 @@
 	return status;
 }
 
-void ocfs2_unlock_buffer_inodes(ocfs2_buffer_lock_ctxt *ctxt)
+void ocfs2_unlock_buffer_inodes(struct ocfs2_buffer_lock_ctxt *ctxt)
 {
-	ocfs2_backing_inode *binode;
+	struct ocfs2_backing_inode *binode;
 	struct rb_node *node;
 
 	/* dlm locks don't mask ints.. this should be lower down */
@@ -413,7 +414,7 @@
 
 	/* unlock in reverse order to minimize waking forward lockers */
 	while ((node = rb_last(&ctxt->b_inodes)) != NULL) {
-		binode = rb_entry(node, ocfs2_backing_inode, ba_node);
+		binode = rb_entry(node, struct ocfs2_backing_inode, ba_node);
 
 		ocfs2_del_io_marker(binode->ba_inode, &binode->ba_task);
 
@@ -447,7 +448,7 @@
 				      size_t count,
 				      loff_t *ppos,
 				      struct ocfs2_write_lock_info *info,
-				      ocfs2_buffer_lock_ctxt *ctxt)
+				      struct ocfs2_buffer_lock_ctxt *ctxt)
 {
 	int ret = 0;
 	ocfs2_super *osb = NULL;
@@ -649,9 +650,9 @@
 }
 
 #if 0
-static void ocfs2_buffer_ctxt_debug(ocfs2_buffer_lock_ctxt *ctxt)
+static void ocfs2_buffer_ctxt_debug(struct ocfs2_buffer_lock_ctxt *ctxt)
 {
-	ocfs2_backing_inode *binode;
+	struct ocfs2_backing_inode *binode;
 	struct inode *inode;
 	struct rb_node *node;
 
@@ -660,7 +661,7 @@
 
 	node = rb_first(&ctxt->b_inodes);
 	while (node) {
-		binode = rb_entry(node, ocfs2_backing_inode, ba_node);
+		binode = rb_entry(node, struct ocfs2_backing_inode, ba_node);
 		inode = binode->ba_inode;
 
 		printk("(%u) ocfs2: inode %llu, locked %d, is target? %s\n",

Modified: trunk/fs/ocfs2/mmap.h
===================================================================
--- trunk/fs/ocfs2/mmap.h	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/mmap.h	2005-06-28 18:30:02 UTC (rev 2442)
@@ -7,26 +7,26 @@
 /* used by file_read/file_write and nopage to coordinate file
  * locking. I keep this out of the dlmglue code, because quite frankly
  * I don't like that we have to do this stuff. */
-typedef struct _ocfs2_io_marker {
+struct ocfs2_io_marker {
 	struct list_head io_list;
 	struct task_struct *io_task;
-} ocfs2_io_marker;
+};
 
 #define __IOMARKER_INITIALIZER(name) {					\
 	.io_list      = { &(name).io_list, &(name).io_list },		\
 	.io_task      = NULL }
 
 #define DECLARE_IO_MARKER(name)						\
-	ocfs2_io_marker name = __IOMARKER_INITIALIZER(name)
+	struct ocfs2_io_marker name = __IOMARKER_INITIALIZER(name)
 
-static inline void ocfs2_init_io_marker(ocfs2_io_marker *task)
+static inline void ocfs2_init_io_marker(struct ocfs2_io_marker *task)
 {
 	INIT_LIST_HEAD(&task->io_list);
 	task->io_task = NULL;
 }
 
 static inline void ocfs2_add_io_marker(struct inode *inode,
-				       ocfs2_io_marker *task)
+				       struct ocfs2_io_marker *task)
 {
 	struct ocfs2_inode_info *oi = OCFS2_I(inode);
 
@@ -37,7 +37,7 @@
 }
 
 static inline void ocfs2_del_io_marker(struct inode *inode,
-				       ocfs2_io_marker *task)
+				       struct ocfs2_io_marker *task)
 {
 	spin_lock(&OCFS2_I(inode)->ip_lock);
 	if (!list_empty(&task->io_list))
@@ -51,11 +51,11 @@
 	int ret = 0;
 	struct ocfs2_inode_info *oi = OCFS2_I(inode);
 	struct list_head *p;
-	ocfs2_io_marker *tmp;
+	struct ocfs2_io_marker *tmp;
 
 	spin_lock(&oi->ip_lock);
 	list_for_each(p, &oi->ip_io_markers) {
-		tmp = list_entry(p, ocfs2_io_marker, io_list);
+		tmp = list_entry(p, struct ocfs2_io_marker, io_list);
 		if (tmp->io_task == task) {
 			ret = 1;
 			break;
@@ -66,7 +66,7 @@
 	return ret;
 }
 
-typedef struct _ocfs2_backing_inode {
+struct ocfs2_backing_inode {
 	struct rb_node           ba_node;
 	struct inode            *ba_inode;
 	unsigned		 ba_meta_locked:1, 	/* meta is locked */
@@ -74,16 +74,16 @@
 				 ba_lock_data:1,	/* should lock data */
 				 ba_lock_meta_level:1, 
 				 ba_lock_data_level:1;
-	struct _ocfs2_io_marker  ba_task;
-} ocfs2_backing_inode;
+	struct ocfs2_io_marker   ba_task;
+};
 
 /* Used to manage the locks taken during I/O. */
-typedef struct _ocfs2_buffer_lock_ctxt {
-	struct rb_root          b_inodes;
-	ocfs2_backing_inode	*b_next_unlocked;
-	ocfs2_lock_callback	b_cb;
-	unsigned long		b_cb_data;
-} ocfs2_buffer_lock_ctxt;
+struct ocfs2_buffer_lock_ctxt {
+	struct rb_root			b_inodes;
+	struct ocfs2_backing_inode	*b_next_unlocked;
+	ocfs2_lock_callback		b_cb;
+	unsigned long			b_cb_data;
+};
 
 #define __BUFFERLOCK_INITIALIZER {					\
 	.b_inodes               = RB_ROOT,				\
@@ -92,33 +92,33 @@
 	.b_cb_data		= 0 }
 
 #define DECLARE_BUFFER_LOCK_CTXT(name)					\
-	ocfs2_buffer_lock_ctxt name = __BUFFERLOCK_INITIALIZER
+	struct ocfs2_buffer_lock_ctxt name = __BUFFERLOCK_INITIALIZER
 
 #define INIT_BUFFER_LOCK_CTXT(ctxt)	\
-	*(ctxt) = (ocfs2_buffer_lock_ctxt) __BUFFERLOCK_INITIALIZER
+	*(ctxt) = (struct ocfs2_buffer_lock_ctxt) __BUFFERLOCK_INITIALIZER
 
 int ocfs2_setup_io_locks(struct super_block *sb,
 			 struct inode *target_inode,
 			 char __user *buf,
 			 size_t size,
-			 ocfs2_buffer_lock_ctxt *ctxt,
-			 ocfs2_backing_inode **target_binode);
+			 struct ocfs2_buffer_lock_ctxt *ctxt,
+			 struct ocfs2_backing_inode **target_binode);
 
-int ocfs2_lock_buffer_inodes(ocfs2_buffer_lock_ctxt *ctxt,
+int ocfs2_lock_buffer_inodes(struct ocfs2_buffer_lock_ctxt *ctxt,
 			     struct inode *last_inode);
 
-void ocfs2_unlock_buffer_inodes(struct _ocfs2_buffer_lock_ctxt *ctxt);
+void ocfs2_unlock_buffer_inodes(struct ocfs2_buffer_lock_ctxt *ctxt);
 
 struct ocfs2_write_lock_info {
-	u64			wl_newsize;
-	unsigned		wl_extended:1,
-				wl_do_direct_io:1,
-				wl_have_i_sem:1,
-				wl_unlock_ctxt:1,
-				wl_have_before:1,
-				wl_have_target_meta:1,
-				wl_have_data_lock:1;
-	ocfs2_backing_inode	*wl_target_binode;
+	u64				wl_newsize;
+	unsigned			wl_extended:1,
+					wl_do_direct_io:1,
+					wl_have_i_sem:1,
+					wl_unlock_ctxt:1,
+					wl_have_before:1,
+					wl_have_target_meta:1,
+					wl_have_data_lock:1;
+	struct ocfs2_backing_inode	*wl_target_binode;
 };
 
 ssize_t ocfs2_write_lock_maybe_extend(struct file *filp,
@@ -126,6 +126,6 @@
 				     size_t count,
 				      loff_t *ppos,
 				     struct ocfs2_write_lock_info *info,
-				     ocfs2_buffer_lock_ctxt *ctxt);
+				     struct ocfs2_buffer_lock_ctxt *ctxt);
 
 #endif  /* OCFS2_MMAP_H */

Modified: trunk/fs/ocfs2/ocfs2.h
===================================================================
--- trunk/fs/ocfs2/ocfs2.h	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/ocfs2.h	2005-06-28 18:30:02 UTC (rev 2442)
@@ -174,7 +174,6 @@
 };
 
 struct _ocfs2_journal;
-struct _ocfs2_slot_info;
 typedef struct _ocfs2_journal_handle ocfs2_journal_handle;
 
 typedef struct _ocfs2_super
@@ -186,7 +185,7 @@
 	struct inode *sys_root_inode;
 	struct inode *system_inodes[NUM_SYSTEM_INODES];
 
-	struct _ocfs2_slot_info *slot_info;
+	struct ocfs2_slot_info *slot_info;
 
 	spinlock_t node_map_lock;
 	ocfs2_node_map mounted_map;

Modified: trunk/fs/ocfs2/slot_map.c
===================================================================
--- trunk/fs/ocfs2/slot_map.c	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/slot_map.c	2005-06-28 18:30:02 UTC (rev 2442)
@@ -42,9 +42,9 @@
 
 #include "buffer_head_io.h"
 
-static s16 __ocfs2_node_num_to_slot(ocfs2_slot_info *si,
+static s16 __ocfs2_node_num_to_slot(struct ocfs2_slot_info *si,
 				    s16 global);
-static void __ocfs2_fill_slot(ocfs2_slot_info *si,
+static void __ocfs2_fill_slot(struct ocfs2_slot_info *si,
 			      s16 slot_num,
 			      s16 node_num);
 
@@ -55,7 +55,7 @@
 void ocfs2_populate_mounted_map(ocfs2_super *osb)
 {
 	int i;
-	ocfs2_slot_info *si = osb->slot_info;
+	struct ocfs2_slot_info *si = osb->slot_info;
 
 	spin_lock(&si->si_lock);
 
@@ -68,7 +68,7 @@
 }
 
 /* post the slot information on disk into our slot_info struct. */
-void ocfs2_update_slot_info(ocfs2_slot_info *si)
+void ocfs2_update_slot_info(struct ocfs2_slot_info *si)
 {
 	int i;
 	s16 *disk_info;
@@ -87,7 +87,7 @@
 /* post the our slot info stuff into it's destination bh and write it
  * out. */
 int ocfs2_update_disk_slots(ocfs2_super *osb,
-			    ocfs2_slot_info *si)
+			    struct ocfs2_slot_info *si)
 {
 	int status, i;
 	s16 *disk_info = (s16 *) si->si_bh->b_data;
@@ -106,7 +106,7 @@
 
 /* try to find global node in the slot info. Returns
  * OCFS2_INVALID_SLOT if nothing is found. */
-static s16 __ocfs2_node_num_to_slot(ocfs2_slot_info *si,
+static s16 __ocfs2_node_num_to_slot(struct ocfs2_slot_info *si,
 				    s16 global)
 {
 	int i;
@@ -121,7 +121,7 @@
 	return ret;
 }
 
-static s16 __ocfs2_find_empty_slot(ocfs2_slot_info *si)
+static s16 __ocfs2_find_empty_slot(struct ocfs2_slot_info *si)
 {
 	int i;
 	s16 ret = OCFS2_INVALID_SLOT;
@@ -135,7 +135,7 @@
 	return ret;
 }
 
-s16 ocfs2_node_num_to_slot(ocfs2_slot_info *si,
+s16 ocfs2_node_num_to_slot(struct ocfs2_slot_info *si,
 			   s16 global)
 {
 	s16 ret;
@@ -146,7 +146,7 @@
 	return ret;
 }
 
-static void __ocfs2_fill_slot(ocfs2_slot_info *si,
+static void __ocfs2_fill_slot(struct ocfs2_slot_info *si,
 			      s16 slot_num,
 			      s16 node_num)
 {
@@ -158,7 +158,7 @@
 	si->si_global_node_nums[slot_num] = node_num;
 }
 
-void ocfs2_clear_slot(ocfs2_slot_info *si,
+void ocfs2_clear_slot(struct ocfs2_slot_info *si,
 		      s16 slot_num)
 {
 	spin_lock(&si->si_lock);
@@ -172,9 +172,9 @@
 	u64 blkno;
 	struct inode *inode = NULL;
 	struct buffer_head *bh = NULL;
-	ocfs2_slot_info *si;
+	struct ocfs2_slot_info *si;
 
-	si = kcalloc(1, sizeof(ocfs2_slot_info), GFP_KERNEL);
+	si = kcalloc(1, sizeof(struct ocfs2_slot_info), GFP_KERNEL);
 	if (!si) {
 		status = -ENOMEM;
 		mlog_errno(status);
@@ -217,7 +217,7 @@
 	return status;
 }
 
-void ocfs2_free_slot_info(ocfs2_slot_info *si)
+void ocfs2_free_slot_info(struct ocfs2_slot_info *si)
 {
 	if (si->si_inode)
 		iput(si->si_inode);
@@ -230,7 +230,7 @@
 {
 	int status;
 	s16 slot;
-	ocfs2_slot_info *si;
+	struct ocfs2_slot_info *si;
 
 	mlog_entry_void();
 
@@ -276,7 +276,7 @@
 void ocfs2_put_slot(ocfs2_super *osb)
 {
 	int status;
-	ocfs2_slot_info *si = osb->slot_info;
+	struct ocfs2_slot_info *si = osb->slot_info;
 
 	if (!si)
 		return;

Modified: trunk/fs/ocfs2/slot_map.h
===================================================================
--- trunk/fs/ocfs2/slot_map.h	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/slot_map.h	2005-06-28 18:30:02 UTC (rev 2442)
@@ -27,7 +27,7 @@
 #ifndef SLOTMAP_H
 #define SLOTMAP_H
 
-typedef struct _ocfs2_slot_info {
+struct ocfs2_slot_info {
 	spinlock_t si_lock;
 
        	struct inode *si_inode;
@@ -35,26 +35,26 @@
 	unsigned int si_num_slots;
 	unsigned int si_size;
 	s16 si_global_node_nums[OCFS2_MAX_SLOTS];
-} ocfs2_slot_info;
+};
 
 int ocfs2_init_slot_info(ocfs2_super *osb);
-void ocfs2_free_slot_info(ocfs2_slot_info *si);
+void ocfs2_free_slot_info(struct ocfs2_slot_info *si);
 
 int ocfs2_find_slot(ocfs2_super *osb);
 void ocfs2_put_slot(ocfs2_super *osb);
 
-void ocfs2_update_slot_info(ocfs2_slot_info *si);
+void ocfs2_update_slot_info(struct ocfs2_slot_info *si);
 int ocfs2_update_disk_slots(ocfs2_super *osb,
-			    ocfs2_slot_info *si);
+			    struct ocfs2_slot_info *si);
 
-s16 ocfs2_node_num_to_slot(ocfs2_slot_info *si,
+s16 ocfs2_node_num_to_slot(struct ocfs2_slot_info *si,
 			   s16 global);
-void ocfs2_clear_slot(ocfs2_slot_info *si,
+void ocfs2_clear_slot(struct ocfs2_slot_info *si,
 		      s16 slot_num);
 
 void ocfs2_populate_mounted_map(ocfs2_super *osb);
 
-static inline int ocfs2_is_empty_slot(ocfs2_slot_info *si,
+static inline int ocfs2_is_empty_slot(struct ocfs2_slot_info *si,
 				      int slot_num)
 {
 	BUG_ON(slot_num == OCFS2_INVALID_SLOT);

Modified: trunk/fs/ocfs2/vote.c
===================================================================
--- trunk/fs/ocfs2/vote.c	2005-06-28 01:34:51 UTC (rev 2441)
+++ trunk/fs/ocfs2/vote.c	2005-06-28 18:30:02 UTC (rev 2442)
@@ -53,7 +53,7 @@
 
 #define OCFS2_MESSAGE_TYPE_VOTE     (0x1)
 #define OCFS2_MESSAGE_TYPE_RESPONSE (0x2)
-typedef struct _ocfs2_msg_hdr
+struct ocfs2_msg_hdr
 {
 	u32 h_response_id; /* used to lookup message handle on sending
 			    * node. */
@@ -61,14 +61,14 @@
 	u64 h_blkno;
 	u32 h_generation;
 	u32 h_node_num;    /* node sending this particular message. */
-} ocfs2_msg_hdr;
+};
 
 /* OCFS2_MAX_FILENAME_LEN is 255 characters, but we want to align this
  * for the network. */
 #define OCFS2_VOTE_FILENAME_LEN 256
-typedef struct _ocfs2_vote_msg
+struct ocfs2_vote_msg
 {
-	ocfs2_msg_hdr v_hdr;
+	struct ocfs2_msg_hdr v_hdr;
 	union {
 		u32 v_generic1;
 		s32 v_orphaned_slot;	/* Used during delete votes */
@@ -77,7 +77,7 @@
 	u32 v_unlink_namelen;
 	u64 v_unlink_parent;
 	u8  v_unlink_dirent[OCFS2_VOTE_FILENAME_LEN];
-} ocfs2_vote_msg;
+};
 
 /* Responses are given these values to maintain backwards
  * compatibility with older ocfs2 versions */
@@ -85,17 +85,17 @@
 #define OCFS2_RESPONSE_BUSY		(-16)
 #define OCFS2_RESPONSE_BAD_MSG		(-22)
 
-typedef struct _ocfs2_response_msg
+struct ocfs2_response_msg
 {
-	ocfs2_msg_hdr r_hdr;
+	struct ocfs2_msg_hdr r_hdr;
 	s32 r_response;
 	s32 r_orphaned_slot;
-} ocfs2_response_msg;
+};
 
-typedef struct _ocfs2_vote_work {
+struct ocfs2_vote_work {
 	struct list_head   w_list;
-	ocfs2_vote_msg w_msg;
-} ocfs2_vote_work;
+	struct ocfs2_vote_msg w_msg;
+};
 
 enum ocfs2_vote_request {
 	OCFS2_VOTE_REQ_INVALID = 0,
@@ -114,23 +114,23 @@
 }
 
 typedef void (*ocfs2_net_response_callback)(void *priv,
-					    ocfs2_response_msg *resp);
+					    struct ocfs2_response_msg *resp);
 struct ocfs2_net_response_cb {
 	ocfs2_net_response_callback	rc_cb;
 	void				*rc_priv;
 };
 
-typedef struct _ocfs2_net_wait_ctxt {
+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;
+	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;
-} ocfs2_net_wait_ctxt;
+};
 
 static void ocfs2_process_mount_request(ocfs2_super *osb,
 					unsigned int node_num)
@@ -344,7 +344,7 @@
 }
 
 static void ocfs2_process_vote(ocfs2_super *osb,
-			       ocfs2_vote_msg *msg)
+			       struct ocfs2_vote_msg *msg)
 {
 	int net_status, vote_response;
 	int orphaned_slot = 0;
@@ -353,8 +353,8 @@
 	u64 blkno, parent_blkno;
 	enum ocfs2_vote_request request;
 	struct inode *inode = NULL;
-	ocfs2_msg_hdr *hdr = &msg->v_hdr;
-	ocfs2_response_msg response;
+	struct ocfs2_msg_hdr *hdr = &msg->v_hdr;
+	struct ocfs2_response_msg response;
 
 	/* decode the network mumbo jumbo into local variables. */
 	request = ntohl(hdr->h_request);
@@ -448,7 +448,7 @@
 respond:
 	/* Response struture is small so we just put it on the stack
 	 * and stuff it inline. */
-	memset(&response, 0, sizeof(ocfs2_response_msg));
+	memset(&response, 0, sizeof(struct ocfs2_response_msg));
 	response.r_hdr.h_response_id = hdr->h_response_id;
 	response.r_hdr.h_blkno = hdr->h_blkno;
 	response.r_hdr.h_generation = hdr->h_generation;
@@ -459,7 +459,7 @@
 	net_status = o2net_send_message(OCFS2_MESSAGE_TYPE_RESPONSE,
 					osb->net_key,
 					&response,
-					sizeof(ocfs2_response_msg),
+					sizeof(struct ocfs2_response_msg),
 					node_num,
 					NULL);
 	/* We still want to error print for ENOPROTOOPT here. The
@@ -479,7 +479,7 @@
 {
 	unsigned long processed;
 	struct ocfs2_lock_res *lockres;
-	ocfs2_vote_work *work;
+	struct ocfs2_vote_work *work;
 
 	mlog_entry_void();
 
@@ -509,7 +509,7 @@
 	while (osb->vote_count) {
 		BUG_ON(list_empty(&osb->vote_list));
 		work = list_entry(osb->vote_list.next,
-				  ocfs2_vote_work, w_list);
+				  struct ocfs2_vote_work, w_list);
 		list_del(&work->w_list);
 		osb->vote_count--;
 		spin_unlock(&osb->vote_task_lock);
@@ -572,9 +572,9 @@
 	return status;
 }
 
-static ocfs2_net_wait_ctxt *ocfs2_new_net_wait_ctxt(unsigned int response_id)
+static struct ocfs2_net_wait_ctxt *ocfs2_new_net_wait_ctxt(unsigned int response_id)
 {
-	ocfs2_net_wait_ctxt *w;
+	struct ocfs2_net_wait_ctxt *w;
 
 	w = kcalloc(1, sizeof(*w), GFP_KERNEL);
 	if (!w) {
@@ -603,7 +603,7 @@
 }
 
 static void ocfs2_dequeue_net_wait_ctxt(ocfs2_super *osb,
-					ocfs2_net_wait_ctxt *w)
+					struct ocfs2_net_wait_ctxt *w)
 {
 	spin_lock(&osb->net_response_lock);
 	list_del(&w->n_list);
@@ -611,7 +611,7 @@
 }
 
 static void ocfs2_queue_net_wait_ctxt(ocfs2_super *osb,
-				      ocfs2_net_wait_ctxt *w)
+				      struct ocfs2_net_wait_ctxt *w)
 {
 	spin_lock(&osb->net_response_lock);
 	list_add_tail(&w->n_list,
@@ -620,7 +620,7 @@
 }
 
 static void __ocfs2_mark_node_responded(ocfs2_super *osb,
-					ocfs2_net_wait_ctxt *w,
+					struct ocfs2_net_wait_ctxt *w,
 					int node_num)
 {
 	assert_spin_locked(&osb->net_response_lock);
@@ -636,12 +636,12 @@
 					int node_num)
 {
 	struct list_head *p;
-	ocfs2_net_wait_ctxt *w = NULL;
+	struct ocfs2_net_wait_ctxt *w = NULL;
 
 	spin_lock(&osb->net_response_lock);
 
 	list_for_each(p, &osb->net_response_list) {
-		w = list_entry(p, ocfs2_net_wait_ctxt, n_list);
+		w = list_entry(p, struct ocfs2_net_wait_ctxt, n_list);
 
 		__ocfs2_mark_node_responded(osb, w, node_num);
 	}
@@ -650,13 +650,13 @@
 }
 
 static int ocfs2_broadcast_vote(ocfs2_super *osb,
-				ocfs2_vote_msg *request,
+				struct ocfs2_vote_msg *request,
 				unsigned int response_id,
 				int *response,
 				struct ocfs2_net_response_cb *callback)
 {
 	int status, i, remote_err;
-	ocfs2_net_wait_ctxt *w = NULL;
+	struct ocfs2_net_wait_ctxt *w = NULL;
 	int dequeued = 0;
 
 	mlog_entry_void();
@@ -728,14 +728,14 @@
 	return status;
 }
 
-static ocfs2_vote_msg * ocfs2_new_vote_request(ocfs2_super *osb,
-					       u64 blkno,
-					       unsigned int generation,
-					       enum ocfs2_vote_request type,
-					       u32 priv)
+static struct ocfs2_vote_msg * ocfs2_new_vote_request(ocfs2_super *osb,
+						      u64 blkno,
+						      unsigned int generation,
+						      enum ocfs2_vote_request type,
+						      u32 priv)
 {
-	ocfs2_vote_msg *request;
-	ocfs2_msg_hdr *hdr;
+	struct ocfs2_vote_msg *request;
+	struct ocfs2_msg_hdr *hdr;
 
 	BUG_ON(!ocfs2_is_valid_vote_request(type));
 
@@ -758,12 +758,12 @@
 /* Complete the buildup of a new vote request and process the
  * broadcast return value. */
 static int ocfs2_do_request_vote(ocfs2_super *osb,
-				 ocfs2_vote_msg *request,
+				 struct ocfs2_vote_msg *request,
 				 struct ocfs2_net_response_cb *callback)
 {
 	int status, response;
 	unsigned int response_id;
-	ocfs2_msg_hdr *hdr;
+	struct ocfs2_msg_hdr *hdr;
 
 	response_id = ocfs2_new_response_id(osb);
 
@@ -784,7 +784,7 @@
 }
 
 static int ocfs2_request_vote(struct inode *inode,
-			      ocfs2_vote_msg *request,
+			      struct ocfs2_vote_msg *request,
 			      struct ocfs2_net_response_cb *callback)
 {
 	int status;
@@ -815,7 +815,7 @@
 }
 
 static void ocfs2_delete_response_cb(void *priv,
-				     ocfs2_response_msg *resp)
+				     struct ocfs2_response_msg *resp)
 {
 	int orphaned_slot, node;
 	struct inode *inode = priv;
@@ -851,7 +851,7 @@
 	int orphaned_slot, status;
 	struct ocfs2_net_response_cb delete_cb;
 	ocfs2_super *osb = OCFS2_SB(inode->i_sb);
-	ocfs2_vote_msg *request;
+	struct ocfs2_vote_msg *request;
 
 	spin_lock(&OCFS2_I(inode)->ip_lock);
 	orphaned_slot = OCFS2_I(inode)->ip_orphaned_slot;
@@ -876,7 +876,7 @@
 	return status;
 }
 
-static void ocfs2_setup_unlink_vote(ocfs2_vote_msg *request,
+static void ocfs2_setup_unlink_vote(struct ocfs2_vote_msg *request,
 				    struct dentry *dentry)
 {
 	struct inode *parent = dentry->d_parent->d_inode;
@@ -902,7 +902,7 @@
 {
 	int status;
 	ocfs2_super *osb = OCFS2_SB(inode->i_sb);
-	ocfs2_vote_msg *request;
+	struct ocfs2_vote_msg *request;
 
 	if (dentry->d_name.len > OCFS2_VOTE_FILENAME_LEN)
 		return -ENAMETOOLONG;
@@ -926,7 +926,7 @@
 {
 	int status;
 	ocfs2_super *osb = OCFS2_SB(inode->i_sb);
-	ocfs2_vote_msg *request;
+	struct ocfs2_vote_msg *request;
 
 	if (dentry->d_name.len > OCFS2_VOTE_FILENAME_LEN)
 		return -ENAMETOOLONG;
@@ -948,7 +948,7 @@
 int ocfs2_request_mount_vote(ocfs2_super *osb)
 {
 	int status;
-	ocfs2_vote_msg *request = NULL;
+	struct ocfs2_vote_msg *request = NULL;
 
 	request = ocfs2_new_vote_request(osb, 0ULL, 0, 
 					 OCFS2_VOTE_REQ_MOUNT, 0);
@@ -983,7 +983,7 @@
 int ocfs2_request_umount_vote(ocfs2_super *osb)
 {
 	int status;
-	ocfs2_vote_msg *request = NULL;
+	struct ocfs2_vote_msg *request = NULL;
 
 	request = ocfs2_new_vote_request(osb, 0ULL, 0, 
 					 OCFS2_VOTE_REQ_UMOUNT, 0);
@@ -1014,14 +1014,14 @@
 }
 
 /* TODO: This should eventually be a hash table! */
-static ocfs2_net_wait_ctxt * __ocfs2_find_net_wait_ctxt(ocfs2_super *osb,
-							u32 response_id)
+static struct ocfs2_net_wait_ctxt * __ocfs2_find_net_wait_ctxt(ocfs2_super *osb,
+							       u32 response_id)
 {
 	struct list_head *p;
-	ocfs2_net_wait_ctxt *w = NULL;
+	struct ocfs2_net_wait_ctxt *w = NULL;
 
 	list_for_each(p, &osb->net_response_list) {
-		w = list_entry(p, ocfs2_net_wait_ctxt, n_list);
+		w = list_entry(p, struct ocfs2_net_wait_ctxt, n_list);
 		if (response_id == w->n_response_id)
 			break;
 		w = NULL;
@@ -1058,11 +1058,11 @@
 	unsigned int response_id, node_num;
 	int response_status;
 	ocfs2_super *osb = data;
-	ocfs2_response_msg *resp;
-	ocfs2_net_wait_ctxt * w;
+	struct ocfs2_response_msg *resp;
+	struct ocfs2_net_wait_ctxt * w;
 	struct ocfs2_net_response_cb *resp_cb;
 
-	resp = (ocfs2_response_msg *) msg->buf;
+	resp = (struct ocfs2_response_msg *) msg->buf;
 
 	response_id = ntohl(resp->r_hdr.h_response_id);
 	node_num = ntohl(resp->r_hdr.h_node_num);
@@ -1111,9 +1111,9 @@
 {
 	int status;
 	ocfs2_super *osb = data;
-	ocfs2_vote_work *work;
+	struct ocfs2_vote_work *work;
 
-	work = kmalloc(sizeof(ocfs2_vote_work), GFP_KERNEL);
+	work = kmalloc(sizeof(struct ocfs2_vote_work), GFP_KERNEL);
 	if (!work) {
 		status = -ENOMEM;
 		mlog_errno(status);
@@ -1121,7 +1121,7 @@
 	}
 
 	INIT_LIST_HEAD(&work->w_list);
-	memcpy(&work->w_msg, msg->buf, sizeof(ocfs2_vote_msg));
+	memcpy(&work->w_msg, msg->buf, sizeof(struct ocfs2_vote_msg));
 
 	mlog(0, "scheduling vote request:\n");
 	mlog(0, "h_response_id = %u\n",
@@ -1164,7 +1164,7 @@
 
 	status = o2net_register_handler(OCFS2_MESSAGE_TYPE_RESPONSE,
 					osb->net_key,
-					sizeof(ocfs2_response_msg),
+					sizeof(struct ocfs2_response_msg),
 					ocfs2_handle_response_message,
 					osb, &osb->osb_net_handlers);
 	if (status) {
@@ -1174,7 +1174,7 @@
 
 	status = o2net_register_handler(OCFS2_MESSAGE_TYPE_VOTE,
 					osb->net_key,
-					sizeof(ocfs2_vote_msg),
+					sizeof(struct ocfs2_vote_msg),
 					ocfs2_handle_vote_message,
 					osb, &osb->osb_net_handlers);
 	if (status) {



More information about the Ocfs2-commits mailing list