aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-03-05 03:21:37 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2010-03-05 13:25:52 -0500
commita9185b41a4f84971b930c519f0c63bd450c4810d (patch)
tree268cf4e206cca12fb9e1dd68984e7c190e465b46 /fs/ext4
parent26821ed40b4230259e770c9911180f38fcaa6f59 (diff)
pass writeback_control to ->write_inode
This gives the filesystem more information about the writeback that is happening. Trond requested this for the NFS unstable write handling, and other filesystems might benefit from this too by beeing able to distinguish between the different callers in more detail. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/ext4.h2
-rw-r--r--fs/ext4/inode.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 4cedc91ec59d..50af1a2c65e7 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -1416,7 +1416,7 @@ int ext4_get_block(struct inode *inode, sector_t iblock,
1416 struct buffer_head *bh_result, int create); 1416 struct buffer_head *bh_result, int create);
1417 1417
1418extern struct inode *ext4_iget(struct super_block *, unsigned long); 1418extern struct inode *ext4_iget(struct super_block *, unsigned long);
1419extern int ext4_write_inode(struct inode *, int); 1419extern int ext4_write_inode(struct inode *, struct writeback_control *);
1420extern int ext4_setattr(struct dentry *, struct iattr *); 1420extern int ext4_setattr(struct dentry *, struct iattr *);
1421extern int ext4_getattr(struct vfsmount *mnt, struct dentry *dentry, 1421extern int ext4_getattr(struct vfsmount *mnt, struct dentry *dentry,
1422 struct kstat *stat); 1422 struct kstat *stat);
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index e11952404e02..d01a6cdbf854 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5177,7 +5177,7 @@ out_brelse:
5177 * `stuff()' is running, and the new i_size will be lost. Plus the inode 5177 * `stuff()' is running, and the new i_size will be lost. Plus the inode
5178 * will no longer be on the superblock's dirty inode list. 5178 * will no longer be on the superblock's dirty inode list.
5179 */ 5179 */
5180int ext4_write_inode(struct inode *inode, int wait) 5180int ext4_write_inode(struct inode *inode, struct writeback_control *wbc)
5181{ 5181{
5182 int err; 5182 int err;
5183 5183
@@ -5191,7 +5191,7 @@ int ext4_write_inode(struct inode *inode, int wait)
5191 return -EIO; 5191 return -EIO;
5192 } 5192 }
5193 5193
5194 if (!wait) 5194 if (wbc->sync_mode != WB_SYNC_ALL)
5195 return 0; 5195 return 0;
5196 5196
5197 err = ext4_force_commit(inode->i_sb); 5197 err = ext4_force_commit(inode->i_sb);
@@ -5201,7 +5201,7 @@ int ext4_write_inode(struct inode *inode, int wait)
5201 err = ext4_get_inode_loc(inode, &iloc); 5201 err = ext4_get_inode_loc(inode, &iloc);
5202 if (err) 5202 if (err)
5203 return err; 5203 return err;
5204 if (wait) 5204 if (wbc->sync_mode == WB_SYNC_ALL)
5205 sync_dirty_buffer(iloc.bh); 5205 sync_dirty_buffer(iloc.bh);
5206 if (buffer_req(iloc.bh) && !buffer_uptodate(iloc.bh)) { 5206 if (buffer_req(iloc.bh) && !buffer_uptodate(iloc.bh)) {
5207 ext4_error(inode->i_sb, __func__, 5207 ext4_error(inode->i_sb, __func__,