[Ocfs2-commits] jlbec commits r1060 - branches/format-changes/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Sat Jun 12 02:05:23 CDT 2004


Author: jlbec
Date: 2004-06-12 01:05:22 -0500 (Sat, 12 Jun 2004)
New Revision: 1060

Added:
   branches/format-changes/src/ocfs2_fs.h
Modified:
   branches/format-changes/src/Makefile
   branches/format-changes/src/ocfs.h
Log:

o Splitting out ocfs2_fs.h for on-disk structures.  I'm currently
  #including it in ocfs.h where the structures used to be, but
  I'm gonna change that when I get kurt synced up.



Modified: branches/format-changes/src/Makefile
===================================================================
--- branches/format-changes/src/Makefile	2004-06-12 05:50:13 UTC (rev 1059)
+++ branches/format-changes/src/Makefile	2004-06-12 06:05:22 UTC (rev 1060)
@@ -146,6 +146,7 @@
 	vote.c
 
 HFILES = \
+	ocfs2_fs.h		\
 	ocfs.h			\
 	ocfs_log.h		\
 	ocfs_compat.h		\

Modified: branches/format-changes/src/ocfs.h
===================================================================
--- branches/format-changes/src/ocfs.h	2004-06-12 05:50:13 UTC (rev 1059)
+++ branches/format-changes/src/ocfs.h	2004-06-12 06:05:22 UTC (rev 1060)
@@ -560,151 +560,8 @@
 #endif
 } ocfs_bh_sem;
 
+#include "ocfs2_fs.h"
 
-/*
- * On disk extent record for OCFS2.  It describes a range of clusters
- * on disk.
- */
-typedef struct _ocfs2_extent_rec {
-/*00*/	__u32 e_cpos;		/* Offset into the file, in clusters */
-	__u32 e_clusters;	/* Clusters covered by this extent */
-	__u64 e_blkno;		/* Physical disk offset, in blocks */
-/*10*/
-} ocfs2_extent_rec;	
-
-/*
- * On disk extent list for OCFS2 (node in the tree)
- */
-typedef struct _ocfs2_extent_list {
-/*00*/	__s16 l_tree_depth;		/* Extent tree depth from this
-					   point.  -1 means data extents
-					   hang directly off this
-					   header (a leaf) */
-	__u16 l_count;			/* Number of extent records */
-	__u16 l_next_free_rec;		/* Next unused extent slot */
-	__u16 l_reserved1;
-	__u64 l_reserved2;		/* Pad to
-					   sizeof(ocfs2_extent_rec) */
-/*10*/	ocfs2_extent_rec l_recs[0];	/* Extent records */
-} ocfs2_extent_list;
-
-/*
- * On disk extent block (indirect block) for OCFS2
- */
-typedef struct _ocfs2_extent_block
-{
-/*00*/	__u8 h_signature[8];		/* Signature for verification */
-	__u64 h_suballoc_blkno;		/* Node suballocator offset,
-					   in blocks */
-/*10*/	__u16 h_suballoc_node;		/* Node suballocator this
-					   extent_header belongs to */
-	__u16 h_reserved1;
-	__u32 h_reserved2;
-	__u64 h_blkno;			/* Offset on disk, in blocks */
-/*20*/	__u64 h_parent_blk;		/* Offset on disk, in blocks,
-					   of this block's parent in the
-					   tree */
-	__u64 h_next_leaf_blk;		/* Offset on disk, in blocks,
-					   of next leaf header pointing
-					   to data */
-/*30*/	ocfs2_extent_list h_list;	/* Extent record list */
-} ocfs2_extent_block;
-
-/*
- * On disk lock structure for OCFS2
- */
-typedef struct _ocfs2_disk_lock
-{
-/*00*/	__u32 dl_master;	/* Node number of current master */
-	__u8 dl_level;		/* Lock level */
-	__u8 dl_reserved1[3];	/* Pad to u64 */
-	__u64 dl_seq_num;	/* Lock transaction seqnum */
-/*10*/	__u32 dl_node_map[8];	/* Bitmap of interested nodes,
-				   was __u32 */ 
-/*30*/
-} ocfs2_disk_lock;
-
-/*
- * On disk superblock for OCFS2.  Note that it is contained inside an
- * ocfs2_dinode, so all offsets are relative to the start of ocfs2_dinode.id2.
- */
-typedef struct _ocfs2_super_block {
-/*00*/	__u16 s_major_rev_level;
-	__u16 s_minor_rev_level;
-	__u16 s_mnt_count;
-	__s16 s_max_mnt_count;
-	__u16 s_state;			/* File system state */
-	__u16 s_errors;			/* Behaviour when detecting errors */
-	__u32 s_checkinterval;		/* Max time between checks */
-/*10*/	__u64 s_lastcheck;		/* Time of last check */
-	__u32 s_creator_os;		/* OS */
-	__u32 s_feature_compat;		/* Compatible feature set */
-/*20*/	__u32 s_feature_incompat;	/* Incompatible feature set */
-	__u32 s_feature_ro_compat;	/* Readonly-compatible feature set */
-	__u64 s_root_blkno;		/* Offset, in blocks, of root directory
-					   dinode */
-/*30*/	__u64 s_system_dir_blkno;	/* Offset, in blocks, of system
-					   directory dinode */
-	__u32 s_blocksize_bits;		/* Blocksize for this fs */
-	__u32 s_clustersize_bits;	/* Clustersize for this fs */
-/*40*/	__u32 s_max_nodes;		/* Max nodes in this cluster before
-					   tunefs required */
-	__u32 s_reserved1;
-	__u64 s_reserved2;
-/*50*/	__u8  s_label[64];		/* Label for mounting, etc. */
-/*90*/	__u8  s_uuid[16];		/* Was vol_id */
-/*A0*/
-} ocfs2_super_block;
-
-/*
- * On disk inode for OCFS2
- */
-typedef struct _ocfs2_dinode {
-/*00*/	__u8 i_signature[8];		/* Signature for validation */
-	__u32 i_generation;		/* Generation number */
-	__u16 i_reserved1;
-	__u16 i_suballoc_node;		/* Node suballocater this inode
-					   belongs to */
-/*10*/	__u64 i_suballoc_blkno;		/* Node suballocator offset,
-       					   in blocks */
-/*18*/	ocfs2_disk_lock i_disk_lock;	/* Lock structure */
-/*48*/	__u32 i_uid;			/* Owner UID */
-	__u32 i_gid;			/* Owning GID */
-/*50*/	__u64 i_size;			/* Size in bytes */
-	__u16 i_mode;			/* File mode */
-	__u16 i_links_count;		/* Links count */
-	__u32 i_flags;			/* File flags */
-/*60*/	__u64 i_atime;			/* Access time */
-	__u64 i_ctime;			/* Creation time */
-/*70*/	__u64 i_mtime;			/* Modification time */
-	__u64 i_dtime;			/* Deletion time */
-/*80*/	__u64 i_blkno;			/* Offset on disk, in blocks */
-	__u32 i_clusters;		/* Cluster count */
-	__u32 i_reserved2;
-/*90*/	__u64 i_last_eb_blk;		/* Pointer to last extent
-					   block */
-	__u64 i_reserved3;
-/*A0*/	__u64 i_reserved4;
-	__u64 i_reserved5;
-/*B0*/	__u64 i_reserved6;
-	union {
-		__u64 i_pad1;		/* Generic way to refer to this 64bit
-					   union */
-		struct {
-			__u64 i_rdev;	/* Device number */
-		} dev1;
-		struct {		/* Info for bitmap system inodes */
-			__u32 i_used;	/* Bits (ie, clusters) used  */
-			__u32 i_total;	/* Total bits (clusters) available */
-		} bitmap1;
-	} id1;				/* Inode type dependant 1 */
-/*C0*/	union {
-		ocfs2_super_block i_super;
-		ocfs2_extent_list i_list;
-	} id2;
-} ocfs2_dinode;
-
-
 typedef struct _ocfs_vol_disk_hdr		   // CLASS
 {
 	__u32 minor_version;                       // NUMBER RANGE(0,UINT_MAX)

Added: branches/format-changes/src/ocfs2_fs.h
===================================================================
--- branches/format-changes/src/ocfs2_fs.h	2004-06-12 05:50:13 UTC (rev 1059)
+++ branches/format-changes/src/ocfs2_fs.h	2004-06-12 06:05:22 UTC (rev 1060)
@@ -0,0 +1,144 @@
+
+/*
+ * On disk extent record for OCFS2.  It describes a range of clusters
+ * on disk.
+ */
+typedef struct _ocfs2_extent_rec {
+/*00*/	__u32 e_cpos;		/* Offset into the file, in clusters */
+	__u32 e_clusters;	/* Clusters covered by this extent */
+	__u64 e_blkno;		/* Physical disk offset, in blocks */
+/*10*/
+} ocfs2_extent_rec;	
+
+/*
+ * On disk extent list for OCFS2 (node in the tree)
+ */
+typedef struct _ocfs2_extent_list {
+/*00*/	__s16 l_tree_depth;		/* Extent tree depth from this
+					   point.  -1 means data extents
+					   hang directly off this
+					   header (a leaf) */
+	__u16 l_count;			/* Number of extent records */
+	__u16 l_next_free_rec;		/* Next unused extent slot */
+	__u16 l_reserved1;
+	__u64 l_reserved2;		/* Pad to
+					   sizeof(ocfs2_extent_rec) */
+/*10*/	ocfs2_extent_rec l_recs[0];	/* Extent records */
+} ocfs2_extent_list;
+
+/*
+ * On disk extent block (indirect block) for OCFS2
+ */
+typedef struct _ocfs2_extent_block
+{
+/*00*/	__u8 h_signature[8];		/* Signature for verification */
+	__u64 h_suballoc_blkno;		/* Node suballocator offset,
+					   in blocks */
+/*10*/	__u16 h_suballoc_node;		/* Node suballocator this
+					   extent_header belongs to */
+	__u16 h_reserved1;
+	__u32 h_reserved2;
+	__u64 h_blkno;			/* Offset on disk, in blocks */
+/*20*/	__u64 h_parent_blk;		/* Offset on disk, in blocks,
+					   of this block's parent in the
+					   tree */
+	__u64 h_next_leaf_blk;		/* Offset on disk, in blocks,
+					   of next leaf header pointing
+					   to data */
+/*30*/	ocfs2_extent_list h_list;	/* Extent record list */
+} ocfs2_extent_block;
+
+/*
+ * On disk lock structure for OCFS2
+ */
+typedef struct _ocfs2_disk_lock
+{
+/*00*/	__u32 dl_master;	/* Node number of current master */
+	__u8 dl_level;		/* Lock level */
+	__u8 dl_reserved1[3];	/* Pad to u64 */
+	__u64 dl_seq_num;	/* Lock transaction seqnum */
+/*10*/	__u32 dl_node_map[8];	/* Bitmap of interested nodes,
+				   was __u32 */ 
+/*30*/
+} ocfs2_disk_lock;
+
+/*
+ * On disk superblock for OCFS2.  Note that it is contained inside an
+ * ocfs2_dinode, so all offsets are relative to the start of ocfs2_dinode.id2.
+ */
+typedef struct _ocfs2_super_block {
+/*00*/	__u16 s_major_rev_level;
+	__u16 s_minor_rev_level;
+	__u16 s_mnt_count;
+	__s16 s_max_mnt_count;
+	__u16 s_state;			/* File system state */
+	__u16 s_errors;			/* Behaviour when detecting errors */
+	__u32 s_checkinterval;		/* Max time between checks */
+/*10*/	__u64 s_lastcheck;		/* Time of last check */
+	__u32 s_creator_os;		/* OS */
+	__u32 s_feature_compat;		/* Compatible feature set */
+/*20*/	__u32 s_feature_incompat;	/* Incompatible feature set */
+	__u32 s_feature_ro_compat;	/* Readonly-compatible feature set */
+	__u64 s_root_blkno;		/* Offset, in blocks, of root directory
+					   dinode */
+/*30*/	__u64 s_system_dir_blkno;	/* Offset, in blocks, of system
+					   directory dinode */
+	__u32 s_blocksize_bits;		/* Blocksize for this fs */
+	__u32 s_clustersize_bits;	/* Clustersize for this fs */
+/*40*/	__u32 s_max_nodes;		/* Max nodes in this cluster before
+					   tunefs required */
+	__u32 s_reserved1;
+	__u64 s_reserved2;
+/*50*/	__u8  s_label[64];		/* Label for mounting, etc. */
+/*90*/	__u8  s_uuid[16];		/* Was vol_id */
+/*A0*/
+} ocfs2_super_block;
+
+/*
+ * On disk inode for OCFS2
+ */
+typedef struct _ocfs2_dinode {
+/*00*/	__u8 i_signature[8];		/* Signature for validation */
+	__u32 i_generation;		/* Generation number */
+	__u16 i_reserved1;
+	__u16 i_suballoc_node;		/* Node suballocater this inode
+					   belongs to */
+/*10*/	__u64 i_suballoc_blkno;		/* Node suballocator offset,
+       					   in blocks */
+/*18*/	ocfs2_disk_lock i_disk_lock;	/* Lock structure */
+/*48*/	__u32 i_uid;			/* Owner UID */
+	__u32 i_gid;			/* Owning GID */
+/*50*/	__u64 i_size;			/* Size in bytes */
+	__u16 i_mode;			/* File mode */
+	__u16 i_links_count;		/* Links count */
+	__u32 i_flags;			/* File flags */
+/*60*/	__u64 i_atime;			/* Access time */
+	__u64 i_ctime;			/* Creation time */
+/*70*/	__u64 i_mtime;			/* Modification time */
+	__u64 i_dtime;			/* Deletion time */
+/*80*/	__u64 i_blkno;			/* Offset on disk, in blocks */
+	__u32 i_clusters;		/* Cluster count */
+	__u32 i_reserved2;
+/*90*/	__u64 i_last_eb_blk;		/* Pointer to last extent
+					   block */
+	__u64 i_reserved3;
+/*A0*/	__u64 i_reserved4;
+	__u64 i_reserved5;
+/*B0*/	__u64 i_reserved6;
+	union {
+		__u64 i_pad1;		/* Generic way to refer to this 64bit
+					   union */
+		struct {
+			__u64 i_rdev;	/* Device number */
+		} dev1;
+		struct {		/* Info for bitmap system inodes */
+			__u32 i_used;	/* Bits (ie, clusters) used  */
+			__u32 i_total;	/* Total bits (clusters) available */
+		} bitmap1;
+	} id1;				/* Inode type dependant 1 */
+/*C0*/	union {
+		ocfs2_super_block i_super;
+		ocfs2_extent_list i_list;
+	} id2;
+} ocfs2_dinode;
+



More information about the Ocfs2-commits mailing list