1 #ifndef _NFS_FS_I
2 #define _NFS_FS_I
3
4 #include <asm/types.h>
5 #include <linux/list.h>
6 #include <linux/nfs.h>
7
8 /*
9 * nfs fs inode data in memory
10 */
11 struct nfs_inode_info {
12 /*
13 * The 64bit 'inode number'
14 */
15 __u64 fsid;
16 __u64 fileid;
17
18 /*
19 * NFS file handle
20 */
21 struct nfs_fh fh;
22
23 /*
24 * Various flags
25 */
26 unsigned short flags;
27
28 /*
29 * read_cache_jiffies is when we started read-caching this inode,
30 * and read_cache_mtime is the mtime of the inode at that time.
31 * attrtimeo is for how long the cached information is assumed
32 * to be valid. A successful attribute revalidation doubles
33 * attrtimeo (up to acregmax/acdirmax), a failure resets it to
34 * acregmin/acdirmin.
35 *
36 * We need to revalidate the cached attrs for this inode if
37 *
38 * jiffies - read_cache_jiffies > attrtimeo
39 *
40 * and invalidate any cached data/flush out any dirty pages if
41 * we find that
42 *
43 * mtime != read_cache_mtime
44 */
45 unsigned long read_cache_jiffies;
46 __u64 read_cache_ctime;
47 __u64 read_cache_mtime;
48 __u64 read_cache_atime;
49 __u64 read_cache_isize;
50 unsigned long attrtimeo;
51 unsigned long attrtimeo_timestamp;
52
53 /*
54 * This is the cookie verifier used for NFSv3 readdir
55 * operations
56 */
57 __u32 cookieverf[2];
58
59 /*
60 * This is the list of dirty unwritten pages.
61 */
62 struct list_head read;
63 struct list_head dirty;
64 struct list_head commit;
65 struct list_head writeback;
66
67 unsigned int nread,
68 ndirty,
69 ncommit,
70 npages;
71
72 /* Flush daemon info */
73 struct inode *hash_next,
74 *hash_prev;
75 unsigned long nextscan;
76 };
77
78 /*
79 * Legal inode flag values
80 */
81 #define NFS_INO_STALE 0x0001 /* possible stale inode */
82 #define NFS_INO_ADVISE_RDPLUS 0x0002 /* advise readdirplus */
83 #define NFS_INO_REVALIDATING 0x0004 /* revalidating attrs */
84 #define NFS_IS_SNAPSHOT 0x0010 /* a snapshot file */
85 #define NFS_INO_FLUSH 0x0020 /* inode is due for flushing */
86
87 /*
88 * NFS lock info
89 */
90 struct nfs_lock_info {
91 u32 state;
92 u32 flags;
93 struct nlm_host *host;
94 };
95
96 /*
97 * Lock flag values
98 */
99 #define NFS_LCK_GRANTED 0x0001 /* lock has been granted */
100
101 #endif
102
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.