aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/nfs_fs.h')
-rw-r--r--include/linux/nfs_fs.h62
1 files changed, 41 insertions, 21 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 7e079f8ce18b..0a1740b2532e 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -9,6 +9,27 @@
9#ifndef _LINUX_NFS_FS_H 9#ifndef _LINUX_NFS_FS_H
10#define _LINUX_NFS_FS_H 10#define _LINUX_NFS_FS_H
11 11
12#include <linux/config.h>
13#include <linux/in.h>
14#include <linux/mm.h>
15#include <linux/pagemap.h>
16#include <linux/rwsem.h>
17#include <linux/wait.h>
18
19#include <linux/sunrpc/debug.h>
20#include <linux/sunrpc/auth.h>
21#include <linux/sunrpc/clnt.h>
22
23#include <linux/nfs.h>
24#include <linux/nfs2.h>
25#include <linux/nfs3.h>
26#include <linux/nfs4.h>
27#include <linux/nfs_xdr.h>
28
29#include <linux/nfs_fs_sb.h>
30
31#include <linux/rwsem.h>
32#include <linux/mempool.h>
12 33
13/* 34/*
14 * Enable debugging support for nfs client. 35 * Enable debugging support for nfs client.
@@ -41,27 +62,9 @@
41#define FLUSH_LOWPRI 8 /* low priority background flush */ 62#define FLUSH_LOWPRI 8 /* low priority background flush */
42#define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */ 63#define FLUSH_HIGHPRI 16 /* high priority memory reclaim flush */
43#define FLUSH_NOCOMMIT 32 /* Don't send the NFSv3/v4 COMMIT */ 64#define FLUSH_NOCOMMIT 32 /* Don't send the NFSv3/v4 COMMIT */
65#define FLUSH_INVALIDATE 64 /* Invalidate the page cache */
44 66
45#ifdef __KERNEL__ 67#ifdef __KERNEL__
46#include <linux/in.h>
47#include <linux/mm.h>
48#include <linux/pagemap.h>
49#include <linux/rwsem.h>
50#include <linux/wait.h>
51
52#include <linux/nfs_fs_sb.h>
53
54#include <linux/sunrpc/debug.h>
55#include <linux/sunrpc/auth.h>
56#include <linux/sunrpc/clnt.h>
57
58#include <linux/nfs.h>
59#include <linux/nfs2.h>
60#include <linux/nfs3.h>
61#include <linux/nfs4.h>
62#include <linux/nfs_xdr.h>
63#include <linux/rwsem.h>
64#include <linux/mempool.h>
65 68
66/* 69/*
67 * NFSv3/v4 Access mode cache entry 70 * NFSv3/v4 Access mode cache entry
@@ -233,8 +236,12 @@ static inline int nfs_caches_unstable(struct inode *inode)
233 236
234static inline void nfs_mark_for_revalidate(struct inode *inode) 237static inline void nfs_mark_for_revalidate(struct inode *inode)
235{ 238{
239 struct nfs_inode *nfsi = NFS_I(inode);
240
236 spin_lock(&inode->i_lock); 241 spin_lock(&inode->i_lock);
237 NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS; 242 nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS;
243 if (S_ISDIR(inode->i_mode))
244 nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_DATA;
238 spin_unlock(&inode->i_lock); 245 spin_unlock(&inode->i_lock);
239} 246}
240 247
@@ -296,7 +303,7 @@ extern int nfs_release(struct inode *, struct file *);
296extern int nfs_attribute_timeout(struct inode *inode); 303extern int nfs_attribute_timeout(struct inode *inode);
297extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode); 304extern int nfs_revalidate_inode(struct nfs_server *server, struct inode *inode);
298extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *); 305extern int __nfs_revalidate_inode(struct nfs_server *, struct inode *);
299extern void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping); 306extern int nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping);
300extern int nfs_setattr(struct dentry *, struct iattr *); 307extern int nfs_setattr(struct dentry *, struct iattr *);
301extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr); 308extern void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr);
302extern void nfs_begin_attr_update(struct inode *); 309extern void nfs_begin_attr_update(struct inode *);
@@ -306,6 +313,10 @@ extern void nfs_end_data_update(struct inode *);
306extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx); 313extern struct nfs_open_context *get_nfs_open_context(struct nfs_open_context *ctx);
307extern void put_nfs_open_context(struct nfs_open_context *ctx); 314extern void put_nfs_open_context(struct nfs_open_context *ctx);
308extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode); 315extern struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_cred *cred, int mode);
316extern struct vfsmount *nfs_do_submount(const struct vfsmount *mnt_parent,
317 const struct dentry *dentry,
318 struct nfs_fh *fh,
319 struct nfs_fattr *fattr);
309 320
310/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */ 321/* linux/net/ipv4/ipconfig.c: trims ip addr off front of name, too. */
311extern u32 root_nfs_parse_addr(char *name); /*__init*/ 322extern u32 root_nfs_parse_addr(char *name); /*__init*/
@@ -392,6 +403,15 @@ extern void nfs_unregister_sysctl(void);
392#endif 403#endif
393 404
394/* 405/*
406 * linux/fs/nfs/namespace.c
407 */
408extern struct list_head nfs_automount_list;
409extern struct inode_operations nfs_mountpoint_inode_operations;
410extern struct inode_operations nfs_referral_inode_operations;
411extern int nfs_mountpoint_expiry_timeout;
412extern void nfs_release_automount_timer(void);
413
414/*
395 * linux/fs/nfs/unlink.c 415 * linux/fs/nfs/unlink.c
396 */ 416 */
397extern int nfs_async_unlink(struct dentry *); 417extern int nfs_async_unlink(struct dentry *);