diff options
author | Christoph Hellwig <hch@lst.de> | 2010-03-05 03:21:37 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-05 13:25:52 -0500 |
commit | a9185b41a4f84971b930c519f0c63bd450c4810d (patch) | |
tree | 268cf4e206cca12fb9e1dd68984e7c190e465b46 /fs/bfs | |
parent | 26821ed40b4230259e770c9911180f38fcaa6f59 (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/bfs')
-rw-r--r-- | fs/bfs/inode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 8f3d9fd89604..f22a7d3dc362 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/smp_lock.h> | 15 | #include <linux/smp_lock.h> |
16 | #include <linux/buffer_head.h> | 16 | #include <linux/buffer_head.h> |
17 | #include <linux/vfs.h> | 17 | #include <linux/vfs.h> |
18 | #include <linux/writeback.h> | ||
18 | #include <asm/uaccess.h> | 19 | #include <asm/uaccess.h> |
19 | #include "bfs.h" | 20 | #include "bfs.h" |
20 | 21 | ||
@@ -98,7 +99,7 @@ error: | |||
98 | return ERR_PTR(-EIO); | 99 | return ERR_PTR(-EIO); |
99 | } | 100 | } |
100 | 101 | ||
101 | static int bfs_write_inode(struct inode *inode, int wait) | 102 | static int bfs_write_inode(struct inode *inode, struct writeback_control *wbc) |
102 | { | 103 | { |
103 | struct bfs_sb_info *info = BFS_SB(inode->i_sb); | 104 | struct bfs_sb_info *info = BFS_SB(inode->i_sb); |
104 | unsigned int ino = (u16)inode->i_ino; | 105 | unsigned int ino = (u16)inode->i_ino; |
@@ -147,7 +148,7 @@ static int bfs_write_inode(struct inode *inode, int wait) | |||
147 | di->i_eoffset = cpu_to_le32(i_sblock * BFS_BSIZE + inode->i_size - 1); | 148 | di->i_eoffset = cpu_to_le32(i_sblock * BFS_BSIZE + inode->i_size - 1); |
148 | 149 | ||
149 | mark_buffer_dirty(bh); | 150 | mark_buffer_dirty(bh); |
150 | if (wait) { | 151 | if (wbc->sync_mode == WB_SYNC_ALL) { |
151 | sync_dirty_buffer(bh); | 152 | sync_dirty_buffer(bh); |
152 | if (buffer_req(bh) && !buffer_uptodate(bh)) | 153 | if (buffer_req(bh) && !buffer_uptodate(bh)) |
153 | err = -EIO; | 154 | err = -EIO; |