[PVFS2-CVS]
commit by slang in pvfs2/src/kernel/linux-2.6: file.c super.c
CVS commit program
cvs at parl.clemson.edu
Tue Jan 10 16:15:24 EST 2006
Update of /projects/cvsroot/pvfs2/src/kernel/linux-2.6
In directory parlweb:/tmp/cvs-serv18779/src/kernel/linux-2.6
Modified Files:
file.c super.c
Log Message:
fix for pwrite04 test that does a pwrite with open(O_APPEND).
fix for f_frsize (fragment size) to be equal to f_bsize. This should fix newer statfs tools that use frsize as the block size instead of bsize. Hopefully, it won't break anything that depended on frsize being hardcoded to 1024.
Index: file.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/file.c,v
diff -p -u -r1.108 -r1.109
--- file.c 6 Jan 2006 15:37:17 -0000 1.108
+++ file.c 10 Jan 2006 21:15:24 -0000 1.109
@@ -306,15 +306,6 @@ static ssize_t pvfs2_file_write(
pvfs2_print("pvfs2_file_write: failed generic argument checks.\n");
return(ret);
}
- /* for whatever reason, count is being set to inode->i_size in
- * generic_write_checks with O_APPEND opens. So if we want that to work,
- * we would have to do a getattr for the size which is ridiculous.
- * So we work that around here...
- */
- if ((file->f_flags & O_APPEND) && (*offset != file->f_pos))
- {
- *offset = file->f_pos;
- }
while(total_count < count)
{
@@ -431,6 +422,12 @@ static ssize_t pvfs2_file_write(
{
update_atime(inode);
}
+
+ if(file->f_pos > inode->i_size)
+ {
+ inode->i_size = file->f_pos;
+ }
+
return total_count;
}
Index: super.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/kernel/linux-2.6/super.c,v
diff -p -u -r1.67 -r1.68
--- super.c 7 Jan 2006 02:47:27 -0000 1.67
+++ super.c 10 Jan 2006 21:15:24 -0000 1.68
@@ -367,7 +367,7 @@ static int pvfs2_statfs(
{
struct statfs tmp_statfs;
- buf->f_frsize = 1024;
+ buf->f_frsize = sb->s_blocksize;
pvfs2_print("sizeof(kstatfs)=%d\n",
(int)sizeof(struct kstatfs));
More information about the PVFS2-CVS
mailing list