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
@@ -3968,7 +3968,7 @@ err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
int btrfs_write_inode(struct inode *inode, int wait)
|
||||
int btrfs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
{
|
||||
struct btrfs_root *root = BTRFS_I(inode)->root;
|
||||
struct btrfs_trans_handle *trans;
|
||||
@@ -3977,7 +3977,7 @@ int btrfs_write_inode(struct inode *inode, int wait)
|
||||
if (root->fs_info->btree_inode == inode)
|
||||
return 0;
|
||||
|
||||
if (wait) {
|
||||
if (wbc->sync_mode == WB_SYNC_ALL) {
|
||||
trans = btrfs_join_transaction(root, 1);
|
||||
btrfs_set_trans_block_group(trans, inode);
|
||||
ret = btrfs_commit_transaction(trans, root);
|
||||
|
Reference in New Issue
Block a user