diff options
author | Chuck Lever <cel@citi.umich.edu> | 2005-08-18 14:24:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-18 15:53:56 -0400 |
commit | 5529680981807b44abf3be30fb6d612ff04f68ff (patch) | |
tree | 57da4e9135c0a85c1f8c6bc797250c0209420b51 /include/linux | |
parent | 3c7bf1eaee1255315fc7c2c4c300295e556ef768 (diff) |
[PATCH] NFS: split nfsi->flags into two fields
Certain bits in nfsi->flags can be manipulated with atomic bitops, and some
are better manipulated via logical bitmask operations.
This patch splits the flags field into two. The next patch introduces atomic
bitops for one of the fields.
Test plan:
Millions of fsx ops on SMP clients.
Signed-off-by: Chuck Lever <cel@netapp.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/nfs_fs.h | 27 |
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 | ||
203 | static inline struct nfs_inode *NFS_I(struct inode *inode) | 208 | static inline struct nfs_inode *NFS_I(struct inode *inode) |
204 | { | 209 | { |
@@ -237,7 +242,7 @@ static inline int nfs_caches_unstable(struct inode *inode) | |||
237 | static inline void NFS_CACHEINV(struct inode *inode) | 242 | static 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 | ||
243 | static inline int nfs_server_capable(struct inode *inode, int cap) | 248 | static inline int nfs_server_capable(struct inode *inode, int cap) |