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:
parent
26821ed40b
commit
a9185b41a4
45 changed files with 115 additions and 72 deletions
|
@ -121,7 +121,7 @@ struct adfs_discmap {
|
|||
|
||||
/* Inode stuff */
|
||||
struct inode *adfs_iget(struct super_block *sb, struct object_info *obj);
|
||||
int adfs_write_inode(struct inode *inode,int unused);
|
||||
int adfs_write_inode(struct inode *inode, struct writeback_control *wbc);
|
||||
int adfs_notify_change(struct dentry *dentry, struct iattr *attr);
|
||||
|
||||
/* map.c */
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
*/
|
||||
#include <linux/smp_lock.h>
|
||||
#include <linux/buffer_head.h>
|
||||
#include <linux/writeback.h>
|
||||
#include "adfs.h"
|
||||
|
||||
/*
|
||||
|
@ -360,7 +361,7 @@ out:
|
|||
* The adfs-specific inode data has already been updated by
|
||||
* adfs_notify_change()
|
||||
*/
|
||||
int adfs_write_inode(struct inode *inode, int wait)
|
||||
int adfs_write_inode(struct inode *inode, struct writeback_control *wbc)
|
||||
{
|
||||
struct super_block *sb = inode->i_sb;
|
||||
struct object_info obj;
|
||||
|
@ -375,7 +376,7 @@ int adfs_write_inode(struct inode *inode, int wait)
|
|||
obj.attr = ADFS_I(inode)->attr;
|
||||
obj.size = inode->i_size;
|
||||
|
||||
ret = adfs_dir_update(sb, &obj, wait);
|
||||
ret = adfs_dir_update(sb, &obj, wbc->sync_mode == WB_SYNC_ALL);
|
||||
unlock_kernel();
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue