filecache.h (65294c1f2c5e72b15b76e16c8c8cfd9359fc9f6f) filecache.h (5e113224c17e2fb156b785ddbbc48a0209fddb0c)
1#ifndef _FS_NFSD_FILECACHE_H
2#define _FS_NFSD_FILECACHE_H
3
4#include <linux/fsnotify_backend.h>
5
6/*
7 * This is the fsnotify_mark container that nfsd attaches to the files that it
8 * is holding open. Note that we have a separate refcount here aside from the

--- 20 unchanged lines hidden (view full) ---

29 * never be dereferenced, only used for comparison.
30 */
31struct 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;
1#ifndef _FS_NFSD_FILECACHE_H
2#define _FS_NFSD_FILECACHE_H
3
4#include <linux/fsnotify_backend.h>
5
6/*
7 * This is the fsnotify_mark container that nfsd attaches to the files that it
8 * is holding open. Note that we have a separate refcount here aside from the

--- 20 unchanged lines hidden (view full) ---

29 * never be dereferenced, only used for comparison.
30 */
31struct 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;
37#define NFSD_FILE_HASHED (0)
38#define NFSD_FILE_PENDING (1)
39#define NFSD_FILE_BREAK_READ (2)
40#define NFSD_FILE_BREAK_WRITE (3)
41#define NFSD_FILE_REFERENCED (4)
42 unsigned long nf_flags;
43 struct inode *nf_inode;
44 unsigned int nf_hashval;
45 atomic_t nf_ref;
46 unsigned char nf_may;
47 struct nfsd_file_mark *nf_mark;
48};
49
50int nfsd_file_cache_init(void);
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
51int nfsd_file_cache_init(void);
51void nfsd_file_cache_purge(void);
52void nfsd_file_cache_purge(struct net *);
52void nfsd_file_cache_shutdown(void);
53void nfsd_file_put(struct nfsd_file *nf);
54struct nfsd_file *nfsd_file_get(struct nfsd_file *nf);
55void nfsd_file_close_inode_sync(struct inode *inode);
56bool nfsd_file_is_cached(struct inode *inode);
57__be32 nfsd_file_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
58 unsigned int may_flags, struct nfsd_file **nfp);
59int nfsd_file_cache_stats_open(struct inode *, struct file *);
60#endif /* _FS_NFSD_FILECACHE_H */
53void nfsd_file_cache_shutdown(void);
54void nfsd_file_put(struct nfsd_file *nf);
55struct nfsd_file *nfsd_file_get(struct nfsd_file *nf);
56void nfsd_file_close_inode_sync(struct inode *inode);
57bool 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);
60int nfsd_file_cache_stats_open(struct inode *, struct file *);
61#endif /* _FS_NFSD_FILECACHE_H */