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

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Jun 23 02:54:53 CDT 2004


Author: jlbec
Date: 2004-06-23 01:54:51 -0500 (Wed, 23 Jun 2004)
New Revision: 1197

Modified:
   trunk/src/inode.c
Log:
o Change feoff on find_inode_args to blkno

Modified: trunk/src/inode.c
===================================================================
--- trunk/src/inode.c	2004-06-23 06:48:15 UTC (rev 1196)
+++ trunk/src/inode.c	2004-06-23 06:54:51 UTC (rev 1197)
@@ -71,9 +71,9 @@
 
 typedef struct _ocfs_find_inode_args
 {
-	__u64 feoff;
+	u64 blkno;
 	unsigned long ino;
-	__u32 flags;
+	u32 flags;
 }
 ocfs_find_inode_args;
 
@@ -141,7 +141,7 @@
 		goto bail;
 	}
 
-	args.feoff = feoff;
+	args.blkno = feoff >> sb->s_blocksize_bits;
 	args.flags = flags;
 	args.ino = ino_from_off(sb, feoff);
 
@@ -206,7 +206,7 @@
 
 	args = opaque;
 
-	if ((OCFS_I(inode)->ip_blkno << inode->i_sb->s_blocksize_bits) != args->feoff) {
+	if (OCFS_I(inode)->ip_blkno != args->blkno) {
 		LOG_ERROR_STATUS(-EINVAL);
 		goto bail;
 	}
@@ -450,7 +450,6 @@
 {
 	struct super_block *sb;
 	ocfs_super *osb;
-	__u64 feoff = 0ULL;
 	ocfs2_dinode *fe;
 	struct buffer_head *bh = NULL;
 	int status;
@@ -471,12 +470,12 @@
 		goto bail;
 	}
 
-	feoff = args->feoff;
-
 	/* Read the FE off disk. This is safe because the kernel only
 	 * does one read_inode2 for a new inode, and if it doesn't
 	 * exist yet then nobody can be working on it! */
-	status = ocfs_read_bh(osb, args->feoff, &bh, 0, NULL);
+	status = ocfs_read_bh(osb,
+			      args->blkno << sb->s_blocksize_bits,
+			      &bh, 0, NULL);
 	if (status < 0) {
 		LOG_ERROR_STATUS(status);
 		make_bad_inode (inode);
@@ -488,10 +487,11 @@
 	if (S_ISCHR(fe->i_mode) || S_ISBLK(fe->i_mode))
     		inode->i_rdev = huge_decode_dev(le64_to_cpu(fe->id1.dev1.i_rdev));
 
-	ocfs_populate_inode (inode, fe, 0);
+	ocfs_populate_inode(inode, fe, 0);
 
-	/* eventually this case has to GO! */
-	if (feoff != (fe->i_blkno << osb->sb->s_blocksize_bits))
+	/* eventually this case has to GO!
+	 *   -- is this comment valid anymore? -- joel */
+	if (args->blkno != fe->i_blkno)
 		BUG();
 
 	if (sysfile)



More information about the Ocfs2-commits mailing list