[Ocfs2-commits] mfasheh commits r1662 - branches/dlm-glue/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon Nov 22 21:33:49 CST 2004


Author: mfasheh
Date: 2004-11-22 21:33:47 -0600 (Mon, 22 Nov 2004)
New Revision: 1662

Modified:
   branches/dlm-glue/src/inode.c
   branches/dlm-glue/src/ocfs.h
   branches/dlm-glue/src/super.c
Log:
* clean up the OCFS_SET_FLAGS and OCFS_CLEAR_FLAGS macros - they were
  hardly used anymore so this was easy.

* remove some old comments and unused variables



Modified: branches/dlm-glue/src/inode.c
===================================================================
--- branches/dlm-glue/src/inode.c	2004-11-23 03:28:43 UTC (rev 1661)
+++ branches/dlm-glue/src/inode.c	2004-11-23 03:33:47 UTC (rev 1662)
@@ -320,7 +320,7 @@
 	i->ip_blkno = 0ULL;
 	i->ip_mmu_private = 0ULL;
 
-	OCFS_SET_FLAG (i->ip_flags, OCFS_INODE_INITIALIZED);
+	i->ip_flags |= OCFS_INODE_INITIALIZED;
 	return 0;
 } /* ocfs_inode_init_private */
 
@@ -498,7 +498,7 @@
 		BUG();
 
 	if (sysfile)
-		OCFS_SET_FLAG(OCFS_I(inode)->ip_flags, OCFS_INODE_SYSTEM_FILE);
+	       OCFS_I(inode)->ip_flags |= OCFS_INODE_SYSTEM_FILE;
 
 	status = 0;
 
@@ -810,7 +810,7 @@
 		goto bail;
 	}
 
-	OCFS_CLEAR_FLAG (OCFS_I(inode)->ip_flags, OCFS_INODE_INITIALIZED);
+	OCFS_I(inode)->ip_flags &= ~OCFS_INODE_INITIALIZED;
 
 	if (OCFS_I(inode)->ip_blkno == -1)
 		BUG();

Modified: branches/dlm-glue/src/ocfs.h
===================================================================
--- branches/dlm-glue/src/ocfs.h	2004-11-23 03:28:43 UTC (rev 1661)
+++ branches/dlm-glue/src/ocfs.h	2004-11-23 03:33:47 UTC (rev 1662)
@@ -90,7 +90,6 @@
 #endif
 
 
-/* sm - ocfs 1.0 fails to set fe->sig for dirs */
 #define  IS_VALID_FILE_ENTRY(ptr)     \
 	(!strcmp((ptr)->i_signature, OCFS2_INODE_SIGNATURE))
 #define  IS_VALID_EXTENT_BLOCK(ptr)  \
@@ -99,13 +98,6 @@
 	(!strcmp((ptr)->bg_signature, OCFS2_GROUP_DESC_SIGNATURE))
 
 /*
-** Macros
-*/
-#define  OCFS_SET_FLAG(flag, value)    ((flag) |= (value))
-#define  OCFS_CLEAR_FLAG(flag, value)  ((flag) &= ~(value))
-
-
-/*
 ** Structures...
 */
 

Modified: branches/dlm-glue/src/super.c
===================================================================
--- branches/dlm-glue/src/super.c	2004-11-23 03:28:43 UTC (rev 1661)
+++ branches/dlm-glue/src/super.c	2004-11-23 03:33:47 UTC (rev 1662)
@@ -556,7 +556,7 @@
 
 	/* Initialize the global data resource */
 	init_MUTEX (&(OcfsGlobalCtxt.global_res));
-	OCFS_SET_FLAG (OcfsGlobalCtxt.flags, OCFS_FLAG_GLBL_CTXT_RESOURCE_INITIALIZED);
+	OcfsGlobalCtxt.flags |= OCFS_FLAG_GLBL_CTXT_RESOURCE_INITIALIZED;
 
 	/* Initialize the memory slabs for oin and file entry */
 	status = ocfs_initialize_mem_lists ();
@@ -586,8 +586,7 @@
 
 		/* Delete the global context resource */
 		if (OcfsGlobalCtxt.flags & OCFS_FLAG_GLBL_CTXT_RESOURCE_INITIALIZED)
-			OCFS_CLEAR_FLAG (OcfsGlobalCtxt.flags,
-				       OCFS_FLAG_GLBL_CTXT_RESOURCE_INITIALIZED);
+			OcfsGlobalCtxt.flags &= ~OCFS_FLAG_GLBL_CTXT_RESOURCE_INITIALIZED;
 
 		if (ocfs_table_header)
 			unregister_sysctl_table(ocfs_table_header);
@@ -744,7 +743,7 @@
 		sizeof(ocfs_journal_lock), 0, SLAB_NO_REAP | SLAB_HWCACHE_ALIGN,
 		NULL, NULL);
 	
-	OCFS_SET_FLAG (OcfsGlobalCtxt.flags, OCFS_FLAG_MEM_LISTS_INITIALIZED);
+	OcfsGlobalCtxt.flags |= OCFS_FLAG_MEM_LISTS_INITIALIZED;
 
 	return 0;
 }				/* ocfs_initialize_mem_lists */
@@ -757,7 +756,7 @@
 {
 	kmem_cache_destroy (OcfsGlobalCtxt.inode_cache);
 	kmem_cache_destroy (OcfsGlobalCtxt.lock_cache);
-	OCFS_CLEAR_FLAG (OcfsGlobalCtxt.flags, OCFS_FLAG_MEM_LISTS_INITIALIZED);
+	OcfsGlobalCtxt.flags &= ~OCFS_FLAG_MEM_LISTS_INITIALIZED;
 }				/* ocfs_free_mem_lists */
 
 static int ocfs2_sb_probe(struct super_block *sb,
@@ -1094,7 +1093,6 @@
 static int ocfs_initialize_osb(ocfs_super *osb, struct buffer_head *bh)
 {
 	int status = 0;
-	u64 p_blkno;
 	int i;
 	ocfs2_dinode *di = NULL;
 	struct inode *inode = NULL;
@@ -1262,8 +1260,6 @@
 		goto bail;
 	}
 
-	// i_size must be at least
-	// (2 + osb->max_nodes + 4) + osb->max_nodes + osb->max_nodes
 	if (inode->i_size >> osb->sb->s_blocksize_bits < OCFS2_MAX_NODES) {
 		LOG_ERROR_ARGS("dlm area size incorrect: "
 			       "found=%llu, need=%u\n", 



More information about the Ocfs2-commits mailing list