- Andries Brouwer: final isofs pieces.
[davej-history.git] / include / linux / nfs_fs_i.h
blobf14f3d8d9c8e38b6b45440f8d461d3b4f3658dcc
1 #ifndef _NFS_FS_I
2 #define _NFS_FS_I
4 #include <asm/types.h>
5 #include <linux/list.h>
6 #include <linux/nfs.h>
8 /*
9 * nfs fs inode data in memory
11 struct nfs_inode_info {
13 * The 64bit 'inode number'
15 __u64 fsid;
16 __u64 fileid;
19 * NFS file handle
21 struct nfs_fh fh;
24 * Various flags
26 unsigned short flags;
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.
36 * We need to revalidate the cached attrs for this inode if
38 * jiffies - read_cache_jiffies > attrtimeo
40 * and invalidate any cached data/flush out any dirty pages if
41 * we find that
43 * mtime != read_cache_mtime
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;
54 * This is the cookie verifier used for NFSv3 readdir
55 * operations
57 __u32 cookieverf[2];
60 * This is the list of dirty unwritten pages.
62 struct list_head read;
63 struct list_head dirty;
64 struct list_head commit;
65 struct list_head writeback;
67 unsigned int nread,
68 ndirty,
69 ncommit,
70 npages;
72 /* Flush daemon info */
73 struct inode *hash_next,
74 *hash_prev;
75 unsigned long nextscan;
79 * Legal inode flag values
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 */
88 * NFS lock info
90 struct nfs_lock_info {
91 u32 state;
92 u32 flags;
93 struct nlm_host *host;
97 * Lock flag values
99 #define NFS_LCK_GRANTED 0x0001 /* lock has been granted */
101 #endif