summaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
author\"Talpey, Thomas\ <Thomas.Talpey@netapp.com>2007-09-10 13:48:47 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-10-09 17:17:55 -0400
commit56928edd5afb51d684c38c0bed56594e93ffe4c7 (patch)
treef4b48628286f923c68727feba78b2b51a6502352 /fs/nfs/super.c
parent0896a725a1c5fdc8773a4d1ab0b73059507f5925 (diff)
downloadop-kernel-dev-56928edd5afb51d684c38c0bed56594e93ffe4c7.zip
op-kernel-dev-56928edd5afb51d684c38c0bed56594e93ffe4c7.tar.gz
NFS - print accurate transport protocol
Use the per-transport strings to display the transport protocol accurately. Signed-off-by: Tom Talpey <tmt@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index b47e87e..347c363 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -432,8 +432,6 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
};
const struct proc_nfs_info *nfs_infop;
struct nfs_client *clp = nfss->nfs_client;
- char buf[12];
- const char *proto;
seq_printf(m, ",vers=%d", clp->rpc_ops->version);
seq_printf(m, ",rsize=%d", nfss->rsize);
@@ -452,18 +450,8 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
else
seq_puts(m, nfs_infop->nostr);
}
- switch (nfss->client->cl_xprt->prot) {
- case IPPROTO_TCP:
- proto = "tcp";
- break;
- case IPPROTO_UDP:
- proto = "udp";
- break;
- default:
- snprintf(buf, sizeof(buf), "%u", nfss->client->cl_xprt->prot);
- proto = buf;
- }
- seq_printf(m, ",proto=%s", proto);
+ seq_printf(m, ",proto=%s",
+ rpc_peeraddr2str(nfss->client, RPC_DISPLAY_PROTO));
seq_printf(m, ",timeo=%lu", 10U * clp->retrans_timeo / HZ);
seq_printf(m, ",retrans=%u", clp->retrans_count);
seq_printf(m, ",sec=%s", nfs_pseudoflavour_to_name(nfss->client->cl_auth->au_flavor));
OpenPOWER on IntegriCloud