[Ocfs2-commits] jlbec commits r1101 - branches/format-changes/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Jun 14 19:44:24 CDT 2004
Author: jlbec
Date: 2004-06-14 18:44:22 -0500 (Mon, 14 Jun 2004)
New Revision: 1101
Modified:
branches/format-changes/src/inode.c
Log:
o Fix 512b block dependancy in ocfs_bread()
Modified: branches/format-changes/src/inode.c
===================================================================
--- branches/format-changes/src/inode.c 2004-06-14 23:40:30 UTC (rev 1100)
+++ branches/format-changes/src/inode.c 2004-06-14 23:44:22 UTC (rev 1101)
@@ -1040,8 +1040,13 @@
/* ???: do we need priv_sem? should have i_sem i think */
if (vbo >= OCFS_I(inode)->alloc_size) {
+ int vbo_pad;
+
+ vbo_pad = inode->i_sb->s_blocksize;
+ vbo_pad -= vbo & (s64)(inode->i_sb->s_blocksize - 1);
+
*err = ocfs_extend_file(osb,
- vbo + 512LL,
+ vbo + vbo_pad,
GET_INODE_FEOFF(inode),
handle, inode, NULL, 0, NULL);
if (*err < 0) {
@@ -1049,8 +1054,8 @@
return NULL;
}
/*
- * fe->i_size will be vbo+512 here, and i_blocks will
- * be whatever is actually allocated.
+ * fe->i_size will be vbo + padding to blocksize here,
+ * and i_blocks will be whatever is actually allocated.
* i_size will be changed by caller (ocfs_add_entry) if
* we return !NULL.
*/
More information about the Ocfs2-commits
mailing list