[Ocfs2-commits] rev 758 - in trunk/src: . inc

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Mar 5 14:19:10 CST 2004


Author: manish
Date: 2004-03-05 14:19:08 -0600 (Fri, 05 Mar 2004)
New Revision: 758

Modified:
   trunk/src/inc/ocfs.h
   trunk/src/super.c
Log:
Use a symbolic constant for maximum osb_id
add #include <asm/processor.h> for 2.6


Modified: trunk/src/inc/ocfs.h
===================================================================
--- trunk/src/inc/ocfs.h	2004-03-05 20:17:59 UTC (rev 757)
+++ trunk/src/inc/ocfs.h	2004-03-05 20:19:08 UTC (rev 758)
@@ -49,7 +49,9 @@
 #endif
 extern inline int generic_fls(int x);
 extern inline int get_bitmask_order(unsigned int count);
-#endif /* 2.4 kernel */
+#else /* 2.4 kernel */
+#include <asm/processor.h>
+#endif /* 2.6 kernel */
 
 #include  <linux/module.h>
 #include  <linux/init.h>
@@ -395,6 +397,7 @@
 #define  OCFS_MOD_SECTOR_SIZE        (OCFS_SECTOR_SIZE - 1)
 #define  OCFS_MAXIMUM_NODES          32
 #define  OCFS_MAX_FILENAME_LENGTH    255
+#define  OCFS_MAX_OSB_ID             65536
 
 #define  OCFS_VOLUME_LOCK_OFFSET     (OCFS_SECTOR_SIZE)
 /* change this to some other sector, change format TODO */

Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c	2004-03-05 20:17:59 UTC (rev 757)
+++ trunk/src/super.c	2004-03-05 20:19:08 UTC (rev 758)
@@ -929,7 +929,7 @@
 
 	spin_lock (&osb_id_lock);
 	osb->osb_id = osb_id;
-	if (osb_id < ULONG_MAX)
+	if (osb_id < OCFS_MAX_OSB_ID)
 		osb_id++;
 	else {
 		spin_unlock (&osb_id_lock);



More information about the Ocfs2-commits mailing list