[Ocfs2-commits] jlbec commits r1075 - branches/format-changes/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Sun Jun 13 01:20:43 CDT 2004
Author: jlbec
Date: 2004-06-13 00:20:41 -0500 (Sun, 13 Jun 2004)
New Revision: 1075
Modified:
branches/format-changes/src/alloc.c
branches/format-changes/src/ocfs1_fs_compat.h
branches/format-changes/src/ocfs2_fs.h
branches/format-changes/src/super.c
Log:
o Rename OCFS1 structures to ocfs1_... in ocfs1_fs_compat.h
o Remove local_alloc warnings, as they've been fixed.
Modified: branches/format-changes/src/alloc.c
===================================================================
--- branches/format-changes/src/alloc.c 2004-06-13 04:41:16 UTC (rev 1074)
+++ branches/format-changes/src/alloc.c 2004-06-13 05:20:41 UTC (rev 1075)
@@ -3943,7 +3943,6 @@
goto bail;
}
-#warning need to change this
alloc = OCFS_BH_GET_DATA_READ(alloc_bh);
/* do a little verification. */
@@ -4017,7 +4016,6 @@
f = NULL;
}
-#warning need to change this
alloc = OCFS_BH_GET_DATA_WRITE(bh);
ocfs_clear_local_alloc(alloc);
OCFS_BH_PUT_DATA(bh);
Modified: branches/format-changes/src/ocfs1_fs_compat.h
===================================================================
--- branches/format-changes/src/ocfs1_fs_compat.h 2004-06-13 04:41:16 UTC (rev 1074)
+++ branches/format-changes/src/ocfs1_fs_compat.h 2004-06-13 05:20:41 UTC (rev 1075)
@@ -44,7 +44,7 @@
/*
* OCFS1 superblock. Lives at sector 0.
*/
-typedef struct _ocfs_vol_disk_hdr_v1
+typedef struct _ocfs1_vol_disk_hdr
{
/*00*/ __u32 minor_version;
__u32 major_version;
@@ -73,10 +73,10 @@
__u32 prot_bits;
__s32 excl_mount;
/*1B0*/
-} ocfs_vol_disk_hdr_v1;
+} ocfs1_vol_disk_hdr;
-typedef struct _ocfs_disk_lock_v1
+typedef struct _ocfs1_disk_lock
{
/*00*/ __u32 curr_master;
__u8 file_lock;
@@ -90,14 +90,14 @@
/*20*/ __u64 oin_node_map;
__u64 dlock_seq_num;
/*30*/
-} ocfs_disk_lock_v1;
+} ocfs1_disk_lock;
/*
* OCFS1 volume label. Lives at sector 1.
*/
-typedef struct _ocfs_vol_label_v1
+typedef struct _ocfs1_vol_label
{
-/*00*/ ocfs_disk_lock_v1 disk_lock;
+/*00*/ ocfs1_disk_lock disk_lock;
/*30*/ __u8 label[MAX_VOL_LABEL_LEN_V1];
/*70*/ __u16 label_len;
/*72*/ __u8 vol_id[MAX_VOL_ID_LENGTH_V1];
@@ -105,7 +105,7 @@
/*84*/ __u8 cluster_name[MAX_CLUSTER_NAME_LEN_V1];
/*A4*/ __u16 cluster_name_len;
/*A6*/
-} ocfs_vol_label_v1;
+} ocfs1_vol_label;
#endif /* _OCFS1_FS_COMPAT_H */
Modified: branches/format-changes/src/ocfs2_fs.h
===================================================================
--- branches/format-changes/src/ocfs2_fs.h 2004-06-13 04:41:16 UTC (rev 1074)
+++ branches/format-changes/src/ocfs2_fs.h 2004-06-13 05:20:41 UTC (rev 1075)
@@ -140,18 +140,6 @@
#define LOCAL_ALLOC(dinode) (&((dinode)->id2.i_lab))
-typedef struct _ocfs2_local_alloc
-{
-/*00*/ __u32 la_bm_off; /* Starting bit offset in main bitmap */
- /* Do we want to use id1.bitmap1? */
- __u16 la_bm_bits; /* Number of bits from main bitmap */
- __u16 la_bits_set; /* Number of set bits */
- __u16 la_size; /* Size of included bitmap, in bytes */
- __u16 la_reserved1;
- __u32 la_reserved2;
-/*10*/ __u8 la_bitmap[0];
-} ocfs2_local_alloc;
-
/*
* On disk extent record for OCFS2. It describes a range of clusters
* on disk.
@@ -221,7 +209,8 @@
/*
* 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.
+ * 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;
@@ -252,6 +241,23 @@
} ocfs2_super_block;
/*
+ * Local allocation bitmap for OCFS2 nodes. Node that it exists inside
+ * an ocfs2_dinode, so all offsets are relative to the start of
+ * ocfs2_dinode.id2.
+ */
+typedef struct _ocfs2_local_alloc
+{
+/*00*/ __u32 la_bm_off; /* Starting bit offset in main bitmap */
+ /* Do we want to use id1.bitmap1? */
+ __u16 la_bm_bits; /* Number of bits from main bitmap */
+ __u16 la_bits_set; /* Number of set bits */
+ __u16 la_size; /* Size of included bitmap, in bytes */
+ __u16 la_reserved1;
+ __u32 la_reserved2;
+/*10*/ __u8 la_bitmap[0];
+} ocfs2_local_alloc;
+
+/*
* On disk inode for OCFS2
*/
typedef struct _ocfs2_dinode {
@@ -364,6 +370,6 @@
{
return OCFS2_LOCAL_BITMAP_DEFAULT_SIZE;
}
-#endif
+#endif /* __KERNEL__ */
#endif /* _OCFS2_FS_H */
Modified: branches/format-changes/src/super.c
===================================================================
--- branches/format-changes/src/super.c 2004-06-13 04:41:16 UTC (rev 1074)
+++ branches/format-changes/src/super.c 2004-06-13 05:20:41 UTC (rev 1075)
@@ -836,7 +836,7 @@
static int ocfs2_sb_probe(struct super_block *sb, struct buffer_head **bh)
{
int status = 0, tmpstat;
- ocfs_vol_disk_hdr_v1 *hdr;
+ ocfs1_vol_disk_hdr *hdr;
ocfs2_dinode *di;
int hardsect, sectsize;
@@ -856,7 +856,7 @@
LOG_ERROR_STATUS(status);
goto bail;
}
- hdr = (ocfs_vol_disk_hdr_v1 *) OCFS_BH_GET_DATA_READ(*bh);
+ hdr = OCFS_BH_GET_DATA_READ(*bh);
if (hdr->major_version == OCFS1_MAJOR_VERSION) {
LOG_ERROR_ARGS("incompatible version: %u.%u\n",
hdr->major_version, hdr->minor_version);
More information about the Ocfs2-commits
mailing list