[Ocfs2-commits] jlbec commits r1198 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Jun 23 12:44:09 CDT 2004


Author: jlbec
Date: 2004-06-23 11:44:07 -0500 (Wed, 23 Jun 2004)
New Revision: 1198

Modified:
   trunk/src/inode.c
   trunk/src/namei.c
   trunk/src/nm.c
   trunk/src/ocfs.h
   trunk/src/super.c
   trunk/src/sysfile.c
Log:

o ocfs_iget() now takes blkno, not feoff
o ino_from_off() is no longer used



Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c	2004-06-23 06:54:51 UTC (rev 1197)
+++ trunk/src/inode.c	2004-06-23 16:44:07 UTC (rev 1198)
@@ -122,28 +122,28 @@
 
 /* 
  * ocfs_iget()
- * feoff is *required*
+ * blkno is *required*
  */
-struct inode *ocfs_iget(ocfs_super *osb, __u64 feoff)
+struct inode *ocfs_iget(ocfs_super *osb, u64 blkno)
 {
 	struct inode *inode = NULL;
 	struct super_block *sb = osb->sb;
 	ocfs_find_inode_args args;
-	__u32 flags = 0;
+	u32 flags = 0;
 
-	LOG_ENTRY_ARGS("(feoff = %llu)\n", feoff);
+	LOG_ENTRY_ARGS("(blkno = %llu)\n", blkno);
 
 	/* Ok. By now we've either got the offsets passed to us by the
 	 * caller, or we just pulled them off the bh. Lets do some
 	 * sanity checks to make sure they're OK. */
-	if (feoff == 0) {
+	if (blkno == 0) {
 		LOG_ERROR_STATUS(-EINVAL);
 		goto bail;
 	}
 
-	args.blkno = feoff >> sb->s_blocksize_bits;
+	args.blkno = blkno;
 	args.flags = flags;
-	args.ino = ino_from_off(sb, feoff);
+	args.ino = ino_from_blkno(sb, blkno);
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 	inode = iget5_locked (sb, args.ino, ocfs_find_actor, 

Modified: trunk/src/namei.c
===================================================================
--- trunk/src/namei.c	2004-06-23 06:54:51 UTC (rev 1197)
+++ trunk/src/namei.c	2004-06-23 16:44:07 UTC (rev 1198)
@@ -150,7 +150,7 @@
 	if (status < 0)
 		goto bail_add;
 	
-	inode = ocfs_iget(osb, fe_off);
+	inode = ocfs_iget(osb, fe_off >> sb->s_blocksize_bits);
 	if (!inode) {
 		LOG_ERROR_STR("Could not create inode!");
 		ret = ERR_PTR (-EACCES);

Modified: trunk/src/nm.c
===================================================================
--- trunk/src/nm.c	2004-06-23 06:54:51 UTC (rev 1197)
+++ trunk/src/nm.c	2004-06-23 16:44:07 UTC (rev 1198)
@@ -760,7 +760,8 @@
 	if ((flags & FLAG_FILE_DELETE) && (flags & FLAG_RELEASE_LOCK))
 		inode = NULL;
 	else {
-		inode = ocfs_iget(osb, lock_id);
+		inode = ocfs_iget(osb,
+				  lock_id >> osb->sb->s_blocksize_bits);
 		if (!inode) {
 			status = -EFAIL;
 			LOG_ERROR_ARGS("Could not find inode: lock_id = %llu, "

Modified: trunk/src/ocfs.h
===================================================================
--- trunk/src/ocfs.h	2004-06-23 06:54:51 UTC (rev 1197)
+++ trunk/src/ocfs.h	2004-06-23 16:44:07 UTC (rev 1198)
@@ -976,14 +976,6 @@
 	return (unsigned long)(blkno & (u64)ULONG_MAX);
 }
 
-static inline unsigned long ino_from_off(struct super_block *sb,
-					 __u64 off)
-{
-	__u64 block_off = off >> sb->s_blocksize_bits;
-
-	return (unsigned long)(block_off & (__u64)ULONG_MAX);
-}
-
 static inline ocfs_bitmap_free_head * ocfs_alloc_bitmap_free_head(void)
 {
 	struct _ocfs_bitmap_free_head *f;

Modified: trunk/src/super.c
===================================================================
--- trunk/src/super.c	2004-06-23 06:54:51 UTC (rev 1197)
+++ trunk/src/super.c	2004-06-23 16:44:07 UTC (rev 1198)
@@ -219,14 +219,14 @@
 
 	LOG_ENTRY();
 
-	new = ocfs_iget(osb, osb->root_blkno << osb->sb->s_blocksize_bits);
+	new = ocfs_iget(osb, osb->root_blkno);
 	if (!new) {
 		LOG_ERROR_STATUS(status = -EINVAL);
 		goto bail;
 	}
 	osb->root_inode = new;
 
-	new = ocfs_iget(osb, osb->system_dir_blkno << osb->sb->s_blocksize_bits);
+	new = ocfs_iget(osb, osb->system_dir_blkno);
 	if (!new) {
 		LOG_ERROR_STATUS(status = -EINVAL);
 		goto bail;

Modified: trunk/src/sysfile.c
===================================================================
--- trunk/src/sysfile.c	2004-06-23 06:54:51 UTC (rev 1197)
+++ trunk/src/sysfile.c	2004-06-23 16:44:07 UTC (rev 1198)
@@ -109,7 +109,7 @@
 		goto bail;
 	}
 
-	inode = ocfs_iget(osb, fe_off);
+	inode = ocfs_iget(osb, fe_off >> osb->sb->s_blocksize_bits);
 	if (!inode) {
 		LOG_ERROR_STR("Could not create inode!");
 		goto bail;



More information about the Ocfs2-commits mailing list