aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/fscache.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-04-03 11:42:47 -0400
committerDavid Howells <dhowells@redhat.com>2009-04-03 11:42:47 -0400
commit5d1acff159730770cbab68b19443518c92ab1000 (patch)
tree71969ce63215ffb636aa539ab049b71eac43da0d /fs/nfs/fscache.h
parent7f8e05f60c87646e12c761fef61dd71a7e67112e (diff)
NFS: Display local caching state
Display the local caching state in /proc/fs/nfsfs/volumes. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Tested-by: Daire Byrne <Daire.Byrne@framestore.com>
Diffstat (limited to 'fs/nfs/fscache.h')
-rw-r--r--fs/nfs/fscache.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/fs/nfs/fscache.h b/fs/nfs/fscache.h
index 1ec3ebb0efcd..6e809bb0ff08 100644
--- a/fs/nfs/fscache.h
+++ b/fs/nfs/fscache.h
@@ -153,6 +153,16 @@ static inline void nfs_readpage_to_fscache(struct inode *inode,
153 __nfs_readpage_to_fscache(inode, page, sync); 153 __nfs_readpage_to_fscache(inode, page, sync);
154} 154}
155 155
156/*
157 * indicate the client caching state as readable text
158 */
159static inline const char *nfs_server_fscache_state(struct nfs_server *server)
160{
161 if (server->fscache && (server->options & NFS_OPTION_FSCACHE))
162 return "yes";
163 return "no ";
164}
165
156 166
157#else /* CONFIG_NFS_FSCACHE */ 167#else /* CONFIG_NFS_FSCACHE */
158static inline int nfs_fscache_register(void) { return 0; } 168static inline int nfs_fscache_register(void) { return 0; }
@@ -201,5 +211,10 @@ static inline int nfs_readpages_from_fscache(struct nfs_open_context *ctx,
201static inline void nfs_readpage_to_fscache(struct inode *inode, 211static inline void nfs_readpage_to_fscache(struct inode *inode,
202 struct page *page, int sync) {} 212 struct page *page, int sync) {}
203 213
214static inline const char *nfs_server_fscache_state(struct nfs_server *server)
215{
216 return "no ";
217}
218
204#endif /* CONFIG_NFS_FSCACHE */ 219#endif /* CONFIG_NFS_FSCACHE */
205#endif /* _NFS_FSCACHE_H */ 220#endif /* _NFS_FSCACHE_H */