[Ocfs2-commits] khackel commits r1266 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Wed Jul 14 23:05:44 CDT 2004


Author: khackel
Date: 2004-07-14 22:05:42 -0500 (Wed, 14 Jul 2004)
New Revision: 1266

Modified:
   trunk/src/file.c
Log:
they want me to put it back in for write, and fix it up for blocksize

Modified: trunk/src/file.c
===================================================================
--- trunk/src/file.c	2004-07-15 03:01:34 UTC (rev 1265)
+++ trunk/src/file.c	2004-07-15 03:05:42 UTC (rev 1266)
@@ -693,14 +693,16 @@
 		*ppos = inode->i_size;
 	}
 
+#if 0
 	if (filp->f_flags & O_DIRECT) {
 		/* anything special for o_direct? */
 		LOG_TRACE_STR ("O_DIRECT");
-		if (((*ppos) & 511) || (count & 511) || 
-		    ((unsigned long)buf & 511) || (inode->i_size & 511)) {
+		if (((*ppos) & (sb->s_blocksize - 1)) || (count & (sb->s_blocksize - 1)) || 
+		    ((unsigned long)buf & (sb->s_blocksize - 1)) || (inode->i_size & (sb->s_blocksize - 1))) {
 			filp->f_flags &= ~O_DIRECT;
 		}
 	}
+#endif
 
 	if (atomic_read(&OCFS_I(inode)->ip_needs_verification)) {
 		LOG_TRACE_STR ("OIN_NEEDS_VERIFICATION");
@@ -818,8 +820,8 @@
 		/* anything special for o_direct? */
 		LOG_TRACE_STR ("O_DIRECT");
 
-		if (((*ppos) & 511) || (count & 511) || 
-		    ((unsigned long)buf & 511) || (inode->i_size & 511)) {
+		if (((*ppos) & (sb->s_blocksize - 1)) || (count & (sb->s_blocksize - 1)) || 
+		    ((unsigned long)buf & (sb->s_blocksize - 1)) || (inode->i_size & (sb->s_blocksize - 1))) {
 			filp->f_flags &= ~O_DIRECT;
 		}
 	}



More information about the Ocfs2-commits mailing list