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.h27
1 files changed, 16 insertions, 11 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 7d78a783c64a..229a1755842a 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -113,6 +113,7 @@ struct nfs_inode {
113 * Various flags 113 * Various flags
114 */ 114 */
115 unsigned int flags; 115 unsigned int flags;
116 unsigned long cache_validity;
116 117
117 /* 118 /*
118 * read_cache_jiffies is when we started read-caching this inode, 119 * read_cache_jiffies is when we started read-caching this inode,
@@ -188,17 +189,21 @@ struct nfs_inode {
188}; 189};
189 190
190/* 191/*
191 * Legal inode flag values 192 * Cache validity bit flags
192 */ 193 */
193#define NFS_INO_STALE 0x0001 /* possible stale inode */ 194#define NFS_INO_INVALID_ATTR 0x0001 /* cached attrs are invalid */
194#define NFS_INO_ADVISE_RDPLUS 0x0002 /* advise readdirplus */ 195#define NFS_INO_INVALID_DATA 0x0002 /* cached data is invalid */
195#define NFS_INO_REVALIDATING 0x0004 /* revalidating attrs */ 196#define NFS_INO_INVALID_ATIME 0x0004 /* cached atime is invalid */
196#define NFS_INO_INVALID_ATTR 0x0008 /* cached attrs are invalid */ 197#define NFS_INO_INVALID_ACCESS 0x0008 /* cached access cred invalid */
197#define NFS_INO_INVALID_DATA 0x0010 /* cached data is invalid */ 198#define NFS_INO_INVALID_ACL 0x0010 /* cached acls are invalid */
198#define NFS_INO_INVALID_ATIME 0x0020 /* cached atime is invalid */ 199#define NFS_INO_REVAL_PAGECACHE 0x0020 /* must revalidate pagecache */
199#define NFS_INO_INVALID_ACCESS 0x0040 /* cached access cred invalid */ 200
200#define NFS_INO_INVALID_ACL 0x0080 /* cached acls are invalid */ 201/*
201#define NFS_INO_REVAL_PAGECACHE 0x1000 /* must revalidate pagecache */ 202 * Legal values of flags field
203 */
204#define NFS_INO_REVALIDATING 0x0001 /* revalidating attrs */
205#define NFS_INO_ADVISE_RDPLUS 0x0002 /* advise readdirplus */
206#define NFS_INO_STALE 0x0004 /* possible stale inode */
202 207
203static inline struct nfs_inode *NFS_I(struct inode *inode) 208static inline struct nfs_inode *NFS_I(struct inode *inode)
204{ 209{
@@ -237,7 +242,7 @@ static inline int nfs_caches_unstable(struct inode *inode)
237static inline void NFS_CACHEINV(struct inode *inode) 242static inline void NFS_CACHEINV(struct inode *inode)
238{ 243{
239 if (!nfs_caches_unstable(inode)) 244 if (!nfs_caches_unstable(inode))
240 NFS_FLAGS(inode) |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS; 245 NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATTR | NFS_INO_INVALID_ACCESS;
241} 246}
242 247
243static inline int nfs_server_capable(struct inode *inode, int cap) 248static inline int nfs_server_capable(struct inode *inode, int cap)