[Ocfs2-commits] jlbec commits r965 - in trunk/src: . inc

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Jun 1 20:00:20 CDT 2004


Author: jlbec
Date: 2004-06-01 19:00:18 -0500 (Tue, 01 Jun 2004)
New Revision: 965

Modified:
   trunk/src/Makefile
   trunk/src/heartbeat.c
   trunk/src/inc/ocfs.h
   trunk/src/io.c
Log:

o Remove lots of stupid unused macros.



Modified: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile	2004-06-01 23:15:58 UTC (rev 964)
+++ trunk/src/Makefile	2004-06-02 00:00:18 UTC (rev 965)
@@ -106,7 +106,6 @@
 endif
 
 ifeq ($(OCFS_PROCESSOR),ppc64)
-  GLOBAL_DEFINES += -D__LP64__
   MACH_CFLAGS += -m64 -fsigned-char -fno-builtin -msoft-float -mminimal-toc
   LDADD += -m elf64ppc
 endif

Modified: trunk/src/heartbeat.c
===================================================================
--- trunk/src/heartbeat.c	2004-06-01 23:15:58 UTC (rev 964)
+++ trunk/src/heartbeat.c	2004-06-02 00:00:18 UTC (rev 965)
@@ -29,6 +29,7 @@
 
 #include "inc/ocfs_log.h"
 #include "inc/ocfs.h"
+#include "inc/ocfs_journal.h"
 #endif
 
 #if defined(USERSPACE_TOOL)

Modified: trunk/src/inc/ocfs.h
===================================================================
--- trunk/src/inc/ocfs.h	2004-06-01 23:15:58 UTC (rev 964)
+++ trunk/src/inc/ocfs.h	2004-06-02 00:00:18 UTC (rev 965)
@@ -99,9 +99,8 @@
 
 #define OCFS_BITMAP_CHUNK   (512) /* size of a chunk, in bytes */
 #define OCFS_BITS_IN_CHUNK  (OCFS_BITMAP_CHUNK * 8)
-//#define OCFS_BITMAP_NUM_BH  (ONE_MEGA_BYTE / OCFS_BITMAP_CHUNK)
 /* Lovely convenience macros. If we move to a scheme where
- * OCFS_BITS_IN_CHUNK or OCFS_BITMAP_NUM_BH are not constant, this'll
+ * OCFS_BITS_IN_CHUNK is not constant, this'll
  * be nice. */
 #define OCFS_CHUNK_TO_GLOBAL_OFF(index, localoffset)                    \
 	((index) * OCFS_BITS_IN_CHUNK + (localoffset))
@@ -137,16 +136,6 @@
 
 #define OCFS_POINTER_SIZE   (sizeof(void *))
 
-#ifdef __LP64__
-#define OCFS_GCC_ATTR_PACKED	__attribute__ ((packed))
-#define OCFS_GCC_ATTR_ALIGNED	__attribute__ ((aligned(4)))
-#define OCFS_GCC_ATTR_PACKALGN	__attribute__ ((aligned(4), packed))
-#else
-#define OCFS_GCC_ATTR_PACKED
-#define OCFS_GCC_ATTR_ALIGNED
-#define OCFS_GCC_ATTR_PACKALGN
-#endif
-
 enum
 {
 	OCFS_VOTE_REQUEST = 1,
@@ -244,10 +233,6 @@
 
 
 
-#define  OCFS_FILE_EXTENT_FILENAME         "ExtentFile"
-#define  OCFS_FILE_EXTENT_BITMAP_FILENAME  "ExtentBitMapFile"
-#define  OCFS_JOURNAL_FILENAME             "JournalFile"
-
 #define  ONE_MEGA_BYTE           (1 * 1024 * 1024)   /* in bytes */
 
 #define  MISS_COUNT_VALUE        30
@@ -327,11 +312,6 @@
 #define OCFS_INODE_BITMAP            (OCFS_INODE_BM_SYSFILE       * OCFS_MAXIMUM_NODES)
 
 
-#define SECTOR_BITS 9
-#define SECTOR_SIZE (1U << SECTOR_BITS)
-#define SECTOR_MASK (SECTOR_SIZE - 1)
-
-
 /* FIXME: Left about for now */
 #define  OCFS_SECTOR_SIZE            512
 
@@ -339,7 +319,6 @@
 #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 */
 #define  OCFS_BITMAP_LOCK_OFFSET     (OCFS_SECTOR_SIZE * 2)
 
@@ -384,8 +363,6 @@
 /*
 ** Structure signatures 
 */
-#define  OCFS_TYPE_OFILE            (0x02534643)
-#define  OCFS_TYPE_OIN            (0x03534643)
 #define  OCFS_TYPE_OSB            (0x05534643)
 #define  OCFS_TYPE_GLOBAL_DATA    (0x07534643)
 
@@ -427,10 +404,7 @@
 #define  DISK_HBEAT_NO_COMM           4		/* in the order of 1 sec */
 #define  DISK_HBEAT_INVALID           0		/* in the order of 100ms */
 
-#define OCFS_X_FOR_DEL_RETRIES  25
 
-#define OCFS_TRANS_FLUSH_LIMIT   (8 * ONE_MEGA_BYTE)
-
 /*
 ** Information on Vote sector of each node
 */
@@ -1006,9 +980,9 @@
 	__u32 version;					// NUMBER RANGE(0,ULONG_MAX)
 	__u32 num_nodes;				// NUMBER RANGE(0,32)
 	__u32 last_node;				// NUMBER RANGE(0,32)
+        __u32 onch_pad;                                 // UNUSED
 	__u64 cfg_seq_num;				// NUMBER RANGE(0,ULONG_LONG_MAX)
 }
-OCFS_GCC_ATTR_PACKALGN
 ocfs_node_config_hdr;					// END CLASS
 
 typedef struct _BARF_BARF_BARF
@@ -1515,17 +1489,15 @@
 	__s32 vote;                     // BOOL
 	__u32 dirty;                     // BOOL
 	__u32 vote_type;                  // FILEFLAG
+	__u32 mounted;                   /* used for journaling */
+	__u8 hbm[OCFS_MAXIMUM_NODES];	// UNUSED my ass
 	__u64 vote_map;                   // NODEBITMAP
 	__u64 publ_seq_num;               // NUMBER RANGE(0,ULONG_LONG_MAX)
 	__u64 dir_ent;                    // NUMBER RANGE(0,ULONG_LONG_MAX)
-	__u8 hbm[OCFS_MAXIMUM_NODES];    // UNUSED
 	/* last seq num used in comm voting */
 	__u64 comm_seq_num;		// NUMBER RANGE(0,ULONG_LONG_MAX)
-	__u32 mounted;                   /* used for journaling */
 	__u64 fe_off;                   /* needed to create inodes. */
-}
-OCFS_GCC_ATTR_PACKALGN
-ocfs_publish;				// END CLASS
+} ocfs_publish;				// END CLASS
 
 typedef struct _ocfs_vote		// CLASS
 {
@@ -1533,9 +1505,8 @@
 	__u64 vote_seq_num;              // NUMBER RANGE(0,ULONG_LONG_MAX)
 	__u64 dir_ent;                   // NUMBER RANGE(0,ULONG_LONG_MAX)
 	__u8 open_handle;                // BOOL
-}
-OCFS_GCC_ATTR_PACKALGN
-ocfs_vote;				// END CLASS
+	__u8 ov_pad[7]; 		// UNUSED
+} ocfs_vote;				// END CLASS
 
 typedef struct _ocfs_local_alloc
 {
@@ -1592,38 +1563,6 @@
 }
 ocfs_file_entry;			  // END CLASS
 
-/* not sizeof-safe across platforms */
-typedef struct _ocfs_index_node
-{
-	__u64 down_ptr;
-	__u64 file_ent_ptr;
-	__u8 name_len;
-	__u8 name[1];
-}
-OCFS_GCC_ATTR_PACKALGN
-ocfs_index_node;
-
-typedef struct _ocfs_index_hdr
-{
-	ocfs_disk_lock disk_lock;
-	__u64 signature;
-	__s64 up_tree_ptr;	/* Pointer to parent of this dnode */
-	__u64 node_disk_off;
-	__u8 state;		/* In recovery, needs recovery etc */
-	__u64 down_ptr	OCFS_GCC_ATTR_ALIGNED;
-	__u8 num_ents;;		/* Number of extents in this Node */
-	__u8 depth;		/* Depth of this Node from root of the btree */
-	__u8 num_ent_used;	/* Num of entries in the dir blk used up. */
-	__u8 dir_node_flags;	/* Flags */
-	__u8 sync_flags;		/* Flags */
-	__u8 index[256];
-	__u8 reserved[161];
-	__u8 file_ent[1];	/* 63 entries here with 32K DIR_NODE size */
-}
-OCFS_GCC_ATTR_PACKED
-ocfs_index_hdr;
-
-
 typedef struct _ocfs_extent_group			// CLASS
 {
 	__u8 signature[8];				// CHAR ARRAY[8]
@@ -1647,23 +1586,14 @@
 }
 ocfs_extent_group;					// END CLASS
 
-typedef struct _ocfs_bitmap_lock
-{
-    ocfs_disk_lock disk_lock;
-    __u32 used_bits;
-}
-OCFS_GCC_ATTR_PACKALGN
-ocfs_bitmap_lock;
-
 typedef struct _ocfs_dlm_msg_hdr
 {
 	__u64 lock_id;
-	__u32 flags;
 	__u64 lock_seq_num;
+	__u32 flags;
 	__u8 open_handle;
-} 
-OCFS_GCC_ATTR_PACKALGN
-ocfs_dlm_msg_hdr;
+        __u8 odmh_pad[3];
+} ocfs_dlm_msg_hdr;
 
 typedef ocfs_dlm_msg_hdr ocfs_dlm_req_master;
 typedef ocfs_dlm_msg_hdr ocfs_dlm_disk_vote_req;
@@ -1757,15 +1687,6 @@
 }
 ocfs_recv_ctxt;
 
-typedef struct _ocfs_offset_map
-{
-	__u32 length;
-	__u64 log_disk_off;
-	__u64 actual_disk_off;
-}
-OCFS_GCC_ATTR_PACKALGN
-ocfs_offset_map;
-
 typedef struct _ocfs_cfg_task
 {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)

Modified: trunk/src/io.c
===================================================================
--- trunk/src/io.c	2004-06-01 23:15:58 UTC (rev 964)
+++ trunk/src/io.c	2004-06-02 00:00:18 UTC (rev 965)
@@ -28,6 +28,7 @@
 
 #include "inc/ocfs_log.h"
 #include "inc/ocfs.h"
+#include "inc/ocfs_journal.h"
 
 #define OCFS_DEBUG_CONTEXT    OCFS_DEBUG_CONTEXT_IO
 



More information about the Ocfs2-commits mailing list