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>
This commit is contained in:

committed by
Al Viro

parent
26821ed40b
commit
a9185b41a4
@@ -5177,7 +5177,7 @@ out_brelse:
|
||||
* `stuff()' is running, and the new i_size will be lost. Plus the inode
|
||||
* will no longer be on the superblock's dirty inode list.
|
||||
*/
|
||||
int ext4_write_inode(struct inode *inode, int wait)
|
||||
int ext4_write_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
{
|
||||
int err;
|
||||
|
||||
@@ -5191,7 +5191,7 @@ int ext4_write_inode(struct inode *inode, int wait)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (!wait)
|
||||
if (wbc->sync_mode != WB_SYNC_ALL)
|
||||
return 0;
|
||||
|
||||
err = ext4_force_commit(inode->i_sb);
|
||||
@@ -5201,7 +5201,7 @@ int ext4_write_inode(struct inode *inode, int wait)
|
||||
err = ext4_get_inode_loc(inode, &iloc);
|
||||
if (err)
|
||||
return err;
|
||||
if (wait)
|
||||
if (wbc->sync_mode == WB_SYNC_ALL)
|
||||
sync_dirty_buffer(iloc.bh);
|
||||
if (buffer_req(iloc.bh) && !buffer_uptodate(iloc.bh)) {
|
||||
ext4_error(inode->i_sb, __func__,
|
||||
|
Reference in New Issue
Block a user