[Ocfs2-commits] mfasheh commits r781 - in trunk/src: . inc
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Mar 16 19:31:09 CST 2004
Author: mfasheh
Date: 2004-03-16 19:31:07 -0600 (Tue, 16 Mar 2004)
New Revision: 781
Modified:
trunk/src/inc/ocfs.h
trunk/src/namei.c
trunk/src/oin.c
trunk/src/super.c
Log:
* get rid of oin->dir_disk_off. It was only used in one place, from
which we could just as easily pull it off the inode.
* change the void *generic_ip in ocfs_inde_private to an ocfs_inode
oin. This gives more typechecking.
Modified: trunk/src/inc/ocfs.h
===================================================================
--- trunk/src/inc/ocfs.h 2004-03-17 00:37:11 UTC (rev 780)
+++ trunk/src/inc/ocfs.h 2004-03-17 01:31:07 UTC (rev 781)
@@ -227,11 +227,11 @@
#define ocfs_getpid() getpid()
#endif
+struct _ocfs_inode;
-
typedef struct _ocfs_inode_private
{
- void * generic_ip;
+ struct _ocfs_inode *oin;
__u64 voteoff;
__u64 feoff;
// struct list_head i_clean_buffers;
@@ -243,7 +243,7 @@
#define OCFS_GENERIC_IP(i) ((ocfs_inode_private *)(i->u.generic_ip))
-#define inode_data_is_oin(i) (OCFS_GENERIC_IP(i)->generic_ip != NULL)
+#define inode_data_is_oin(i) (OCFS_GENERIC_IP(i)->oin != NULL)
#define INODE_DELETED(i) (OCFS_GENERIC_IP(i)->deleted)
#define SET_INODE_DELETED(i) OCFS_GENERIC_IP(i)->deleted = 1
@@ -273,7 +273,7 @@
GET_INODE_OIN(i)= (void *)o; \
} while (0)
-#define GET_INODE_OIN(i) ((ocfs_inode *)(OCFS_GENERIC_IP(i)->generic_ip))
+#define GET_INODE_OIN(i) ((OCFS_GENERIC_IP(i)->oin))
#define FIRST_FILE_ENTRY(dir) ((char *) ((char *)dir)+OCFS_SECTOR_SIZE)
#define FILEENT(dir,idx) (ocfs_file_entry *) ( ((char *)dir) + \
@@ -1847,7 +1847,6 @@
ocfs_extent_map map;
__s64 alloc_size;
__u64 file_disk_off; /* file location on the volume */
- __u64 dir_disk_off; /* for dirs, offset to dirnode structure */
__u64 chng_seq_num;
__u64 parent_dirnode_off; /* from the start of vol */
__u32 open_hndl_cnt;
Modified: trunk/src/namei.c
===================================================================
--- trunk/src/namei.c 2004-03-17 00:37:11 UTC (rev 780)
+++ trunk/src/namei.c 2004-03-17 01:31:07 UTC (rev 781)
@@ -283,9 +283,6 @@
oin->chng_seq_num = DISK_LOCK_SEQNUM (fe);
oin->parent_dirnode_off = parent_off;
- if (S_ISDIR (mode))
- oin->dir_disk_off = fe->extents[0].disk_off;
-
LOG_TRACE_ARGS("ocfs_mknod: new_fe_bh: this_sector = %u.%u, "
"extents[0].disk_off = %u.%u\n",
HILO(fe->this_sector), HILO(fe->extents[0].disk_off));
@@ -948,10 +945,7 @@
}
/* new parent dir offset */
- if (inode_data_is_oin (new_dir))
- newDirOff = (GET_INODE_OIN(new_dir))->dir_disk_off;
- else
- newDirOff = GET_INODE_VOTEOFF (new_dir);
+ newDirOff = GET_INODE_VOTEOFF (new_dir);
if (new_dentry->d_inode != NULL && inode_data_is_oin (new_dentry->d_inode))
newOIN = GET_INODE_OIN(new_dentry->d_inode);
Modified: trunk/src/oin.c
===================================================================
--- trunk/src/oin.c 2004-03-17 00:37:11 UTC (rev 780)
+++ trunk/src/oin.c 2004-03-17 01:31:07 UTC (rev 781)
@@ -308,7 +308,6 @@
LOG_ERROR_STATUS (status);
goto leave;
}
- oin->dir_disk_off = fe->extents[0].disk_off;
} else {
__u32 flags = OCFS_OIN_IN_USE;
@@ -444,7 +443,6 @@
}
}
- oin->dir_disk_off = 0;
oin->osb = osb;
oin->oin_flags |= flags;
oin->open_hndl_cnt = 0;
@@ -595,8 +593,6 @@
osb->oin_root_dir = oin;
- oin->dir_disk_off = osb->vol_layout.root_start_off;
-
finally:
if (status < 0 && oin)
ocfs_release_oin (oin, true);
Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c 2004-03-17 00:37:11 UTC (rev 780)
+++ trunk/src/super.c 2004-03-17 01:31:07 UTC (rev 781)
@@ -789,7 +789,7 @@
if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
SLAB_CTOR_CONSTRUCTOR) {
- i->generic_ip = NULL;
+ i->oin = NULL;
i->voteoff = 0;
i->feoff = 0;
atomic_set(&i->i_clean_buffer_seq, 0);
More information about the Ocfs2-commits
mailing list