aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/client.c7
-rw-r--r--fs/nfs/fscache.h15
2 files changed, 19 insertions, 3 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index aa04da8748a6..726fe5a845b4 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1564,7 +1564,7 @@ static int nfs_volume_list_show(struct seq_file *m, void *v)
1564 1564
1565 /* display header on line 1 */ 1565 /* display header on line 1 */
1566 if (v == &nfs_volume_list) { 1566 if (v == &nfs_volume_list) {
1567 seq_puts(m, "NV SERVER PORT DEV FSID\n"); 1567 seq_puts(m, "NV SERVER PORT DEV FSID FSC\n");
1568 return 0; 1568 return 0;
1569 } 1569 }
1570 /* display one transport per line on subsequent lines */ 1570 /* display one transport per line on subsequent lines */
@@ -1578,12 +1578,13 @@ static int nfs_volume_list_show(struct seq_file *m, void *v)
1578 (unsigned long long) server->fsid.major, 1578 (unsigned long long) server->fsid.major,
1579 (unsigned long long) server->fsid.minor); 1579 (unsigned long long) server->fsid.minor);
1580 1580
1581 seq_printf(m, "v%u %s %s %-7s %-17s\n", 1581 seq_printf(m, "v%u %s %s %-7s %-17s %s\n",
1582 clp->rpc_ops->version, 1582 clp->rpc_ops->version,
1583 rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_HEX_ADDR), 1583 rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_HEX_ADDR),
1584 rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_HEX_PORT), 1584 rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_HEX_PORT),
1585 dev, 1585 dev,
1586 fsid); 1586 fsid,
1587 nfs_server_fscache_state(server));
1587 1588
1588 return 0; 1589 return 0;
1589} 1590}
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 */