diff options
author | Ben Myers <bpm@sgi.com> | 2010-02-17 15:05:11 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2010-02-20 16:13:44 -0500 |
commit | f501912a35c02eadc55ca9396ece55fe36f785d0 (patch) | |
tree | f5d6f66d2ad14910e3c2c3d6725cac9402f37c1a /include/linux/exportfs.h | |
parent | 7e469af97eed947ba9204712601281a69ae8eb6c (diff) |
commit_metadata export operation replacing nfsd_sync_dir
- Add commit_metadata export_operation to allow the underlying filesystem to
decide how to commit an inode most efficiently.
- Usage of nfsd_sync_dir and write_inode_now has been replaced with the
commit_metadata function that takes a svc_fh.
- The commit_metadata function calls the commit_metadata export_op if it's
there, or else falls back to sync_inode instead of fsync and write_inode_now
because only metadata need be synced here.
- nfsd4_sync_rec_dir now uses vfs_fsync so that commit_metadata can be static
Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/exportfs.h')
-rw-r--r-- | include/linux/exportfs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index dc12f416a49f..a9cd507f8cd2 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -96,6 +96,7 @@ struct fid { | |||
96 | * @fh_to_parent: find the implied object's parent and get a dentry for it | 96 | * @fh_to_parent: find the implied object's parent and get a dentry for it |
97 | * @get_name: find the name for a given inode in a given directory | 97 | * @get_name: find the name for a given inode in a given directory |
98 | * @get_parent: find the parent of a given directory | 98 | * @get_parent: find the parent of a given directory |
99 | * @commit_metadata: commit metadata changes to stable storage | ||
99 | * | 100 | * |
100 | * See Documentation/filesystems/nfs/Exporting for details on how to use | 101 | * See Documentation/filesystems/nfs/Exporting for details on how to use |
101 | * this interface correctly. | 102 | * this interface correctly. |
@@ -137,6 +138,9 @@ struct fid { | |||
137 | * is also a directory. In the event that it cannot be found, or storage | 138 | * is also a directory. In the event that it cannot be found, or storage |
138 | * space cannot be allocated, a %ERR_PTR should be returned. | 139 | * space cannot be allocated, a %ERR_PTR should be returned. |
139 | * | 140 | * |
141 | * commit_metadata: | ||
142 | * @commit_metadata should commit metadata changes to stable storage. | ||
143 | * | ||
140 | * Locking rules: | 144 | * Locking rules: |
141 | * get_parent is called with child->d_inode->i_mutex down | 145 | * get_parent is called with child->d_inode->i_mutex down |
142 | * get_name is not (which is possibly inconsistent) | 146 | * get_name is not (which is possibly inconsistent) |
@@ -152,6 +156,7 @@ struct export_operations { | |||
152 | int (*get_name)(struct dentry *parent, char *name, | 156 | int (*get_name)(struct dentry *parent, char *name, |
153 | struct dentry *child); | 157 | struct dentry *child); |
154 | struct dentry * (*get_parent)(struct dentry *child); | 158 | struct dentry * (*get_parent)(struct dentry *child); |
159 | int (*commit_metadata)(struct inode *inode); | ||
155 | }; | 160 | }; |
156 | 161 | ||
157 | extern int exportfs_encode_fh(struct dentry *dentry, struct fid *fid, | 162 | extern int exportfs_encode_fh(struct dentry *dentry, struct fid *fid, |