summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-11 22:57:12 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-11 22:57:12 -0700
commita1ff5989c622e78d2266237396545876359f5edf (patch)
tree26c617817893fc99fe0def817b5705635accf543 /include/linux
parentaf70f7673155616ffd004d551e1b612002a58bf0 (diff)
[PATCH] ext3 fsync() and fdatasync() speedup
ext3's fsync/fdatasync implementation is currently syncing the inode via a full journal commit even if it was unaltered. Fix that up by exporting the core VFS's inode sync function to modules and calling it if the inode is dirty. We need to do it this way so that the inode is moved to the appropriate superblock list and so that the i_state dirty flags are appropriately updated. This speeds up ext3 fsync() for file overwrites by a factor of four (disk non-writeback) to forty (disk in writeback mode).
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e47f6360f74c..3e71560374c0 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -925,6 +925,7 @@ static inline void file_accessed(struct file *file)
touch_atime(file->f_vfsmnt, file->f_dentry);
}
+int sync_inode(struct inode *inode, struct writeback_control *wbc);
/**
* &export_operations - for nfsd to communicate with file systems