[Ocfs2-commits] wcoekaer commits r1280 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Jul 15 21:02:12 CDT 2004


Author: wcoekaer
Date: 2004-07-15 20:02:11 -0500 (Thu, 15 Jul 2004)
New Revision: 1280

Modified:
   trunk/src/file.c
Log:
added back in the i_size check in ocfs_file_read and take out O_DIRECT when
filesize != aligned. to make oracore work



Modified: trunk/src/file.c
===================================================================
--- trunk/src/file.c	2004-07-16 00:27:45 UTC (rev 1279)
+++ trunk/src/file.c	2004-07-16 01:02:11 UTC (rev 1280)
@@ -835,8 +835,9 @@
 		/* anything special for o_direct? */
 		LOG_TRACE_STR ("O_DIRECT");
 		if (((*ppos) & (sector_size - 1)) || (count & (sector_size - 1)) || 
-		    ((unsigned long)buf & (sector_size - 1)) ) {
+		    ((unsigned long)buf & (sector_size - 1)) || (inode->i_size & (sector_size -1))) {
 			do_direct_io = 0;
+			filp->f_flags &= ~O_DIRECT;
 		} else
 			do_direct_io = 1;
 	}



More information about the Ocfs2-commits mailing list