From bdfa1b999a4d833104617fdeb58fee9d73cb8fb7 Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 3 Apr 2009 16:42:47 +0100 Subject: [PATCH] --- yaml --- r: 140227 b: refs/heads/master c: 5d1acff159730770cbab68b19443518c92ab1000 h: refs/heads/master i: 140225: d91abdfae4fec08dade60cd0978b94c62cf0c071 140223: 72b1deb9f281e0fae646edbd302fc4e357951d67 v: v3 --- [refs] | 2 +- trunk/fs/nfs/client.c | 7 ++++--- trunk/fs/nfs/fscache.h | 15 +++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 43225c746b9d..c429026cb7fa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7f8e05f60c87646e12c761fef61dd71a7e67112e +refs/heads/master: 5d1acff159730770cbab68b19443518c92ab1000 diff --git a/trunk/fs/nfs/client.c b/trunk/fs/nfs/client.c index aa04da8748a6..726fe5a845b4 100644 --- a/trunk/fs/nfs/client.c +++ b/trunk/fs/nfs/client.c @@ -1564,7 +1564,7 @@ static int nfs_volume_list_show(struct seq_file *m, void *v) /* display header on line 1 */ if (v == &nfs_volume_list) { - seq_puts(m, "NV SERVER PORT DEV FSID\n"); + seq_puts(m, "NV SERVER PORT DEV FSID FSC\n"); return 0; } /* display one transport per line on subsequent lines */ @@ -1578,12 +1578,13 @@ static int nfs_volume_list_show(struct seq_file *m, void *v) (unsigned long long) server->fsid.major, (unsigned long long) server->fsid.minor); - seq_printf(m, "v%u %s %s %-7s %-17s\n", + seq_printf(m, "v%u %s %s %-7s %-17s %s\n", clp->rpc_ops->version, rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_HEX_ADDR), rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_HEX_PORT), dev, - fsid); + fsid, + nfs_server_fscache_state(server)); return 0; } diff --git a/trunk/fs/nfs/fscache.h b/trunk/fs/nfs/fscache.h index 1ec3ebb0efcd..6e809bb0ff08 100644 --- a/trunk/fs/nfs/fscache.h +++ b/trunk/fs/nfs/fscache.h @@ -153,6 +153,16 @@ static inline void nfs_readpage_to_fscache(struct inode *inode, __nfs_readpage_to_fscache(inode, page, sync); } +/* + * indicate the client caching state as readable text + */ +static inline const char *nfs_server_fscache_state(struct nfs_server *server) +{ + if (server->fscache && (server->options & NFS_OPTION_FSCACHE)) + return "yes"; + return "no "; +} + #else /* CONFIG_NFS_FSCACHE */ static inline int nfs_fscache_register(void) { return 0; } @@ -201,5 +211,10 @@ static inline int nfs_readpages_from_fscache(struct nfs_open_context *ctx, static inline void nfs_readpage_to_fscache(struct inode *inode, struct page *page, int sync) {} +static inline const char *nfs_server_fscache_state(struct nfs_server *server) +{ + return "no "; +} + #endif /* CONFIG_NFS_FSCACHE */ #endif /* _NFS_FSCACHE_H */