1 #ifndef _FS_NFSD_FILECACHE_H
2 #define _FS_NFSD_FILECACHE_H
3
4 #include <linux/fsnotify_backend.h>
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 struct nfsd_file_mark {
21 struct fsnotify_mark nfm_mark;
22 atomic_t nfm_ref;
23 };
24
25
26
27
28
29
30
31 struct nfsd_file {
32 struct hlist_node nf_node;
33 struct list_head nf_lru;
34 struct rcu_head nf_rcu;
35 struct file *nf_file;
36 const struct cred *nf_cred;
37 struct net *nf_net;
38 #define NFSD_FILE_HASHED (0)
39 #define NFSD_FILE_PENDING (1)
40 #define NFSD_FILE_BREAK_READ (2)
41 #define NFSD_FILE_BREAK_WRITE (3)
42 #define NFSD_FILE_REFERENCED (4)
43 unsigned long nf_flags;
44 struct inode *nf_inode;
45 unsigned int nf_hashval;
46 atomic_t nf_ref;
47 unsigned char nf_may;
48 struct nfsd_file_mark *nf_mark;
49 };
50
51 int nfsd_file_cache_init(void);
52 void nfsd_file_cache_purge(struct net *);
53 void nfsd_file_cache_shutdown(void);
54 void nfsd_file_put(struct nfsd_file *nf);
55 struct nfsd_file *nfsd_file_get(struct nfsd_file *nf);
56 void nfsd_file_close_inode_sync(struct inode *inode);
57 bool nfsd_file_is_cached(struct inode *inode);
58 __be32 nfsd_file_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
59 unsigned int may_flags, struct nfsd_file **nfp);
60 int nfsd_file_cache_stats_open(struct inode *, struct file *);
61 #endif