aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2006-03-20 13:44:22 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:22 -0500
commitcc0175c1dc1de8f6af0eb0631dcc5b999a6fcc42 (patch)
treeb219a9c16f0ef3ff0982450c32aa0f09d503782a /fs/lockd
parent4ece3a2d18fd7fe1d4972284a8c98c569020093f (diff)
SUNRPC: display human-readable procedure name in rpc_iostats output
Add fields to the rpc_procinfo struct that allow the display of a human-readable name for each procedure in the rpc_iostats output. Also fix it so that the NFSv4 stats are broken up correctly by sub-procedure number. NFSv4 uses only two real RPC procedures: NULL, and COMPOUND. Test plan: Mount with NFSv2, NFSv3, and NFSv4, and do "cat /proc/self/mountstats". Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/mon.c4
-rw-r--r--fs/lockd/xdr.c4
-rw-r--r--fs/lockd/xdr4.c4
3 files changed, 10 insertions, 2 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 0edc03e67966..84ee39e6a3a2 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -214,12 +214,16 @@ static struct rpc_procinfo nsm_procedures[] = {
214 .p_encode = (kxdrproc_t) xdr_encode_mon, 214 .p_encode = (kxdrproc_t) xdr_encode_mon,
215 .p_decode = (kxdrproc_t) xdr_decode_stat_res, 215 .p_decode = (kxdrproc_t) xdr_decode_stat_res,
216 .p_bufsiz = MAX(SM_mon_sz, SM_monres_sz) << 2, 216 .p_bufsiz = MAX(SM_mon_sz, SM_monres_sz) << 2,
217 .p_statidx = SM_MON,
218 .p_name = "MONITOR",
217 }, 219 },
218[SM_UNMON] = { 220[SM_UNMON] = {
219 .p_proc = SM_UNMON, 221 .p_proc = SM_UNMON,
220 .p_encode = (kxdrproc_t) xdr_encode_unmon, 222 .p_encode = (kxdrproc_t) xdr_encode_unmon,
221 .p_decode = (kxdrproc_t) xdr_decode_stat, 223 .p_decode = (kxdrproc_t) xdr_decode_stat,
222 .p_bufsiz = MAX(SM_mon_id_sz, SM_unmonres_sz) << 2, 224 .p_bufsiz = MAX(SM_mon_id_sz, SM_unmonres_sz) << 2,
225 .p_statidx = SM_UNMON,
226 .p_name = "UNMONITOR",
223 }, 227 },
224}; 228};
225 229
diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c
index 1e984ab14d3f..766ce06146b5 100644
--- a/fs/lockd/xdr.c
+++ b/fs/lockd/xdr.c
@@ -546,7 +546,9 @@ nlmclt_decode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp)
546 .p_proc = NLMPROC_##proc, \ 546 .p_proc = NLMPROC_##proc, \
547 .p_encode = (kxdrproc_t) nlmclt_encode_##argtype, \ 547 .p_encode = (kxdrproc_t) nlmclt_encode_##argtype, \
548 .p_decode = (kxdrproc_t) nlmclt_decode_##restype, \ 548 .p_decode = (kxdrproc_t) nlmclt_decode_##restype, \
549 .p_bufsiz = MAX(NLM_##argtype##_sz, NLM_##restype##_sz) << 2 \ 549 .p_bufsiz = MAX(NLM_##argtype##_sz, NLM_##restype##_sz) << 2, \
550 .p_statidx = NLMPROC_##proc, \
551 .p_name = #proc, \
550 } 552 }
551 553
552static struct rpc_procinfo nlm_procedures[] = { 554static struct rpc_procinfo nlm_procedures[] = {
diff --git a/fs/lockd/xdr4.c b/fs/lockd/xdr4.c
index 906ddc203186..36eb175ec335 100644
--- a/fs/lockd/xdr4.c
+++ b/fs/lockd/xdr4.c
@@ -551,7 +551,9 @@ nlm4clt_decode_res(struct rpc_rqst *req, u32 *p, struct nlm_res *resp)
551 .p_proc = NLMPROC_##proc, \ 551 .p_proc = NLMPROC_##proc, \
552 .p_encode = (kxdrproc_t) nlm4clt_encode_##argtype, \ 552 .p_encode = (kxdrproc_t) nlm4clt_encode_##argtype, \
553 .p_decode = (kxdrproc_t) nlm4clt_decode_##restype, \ 553 .p_decode = (kxdrproc_t) nlm4clt_decode_##restype, \
554 .p_bufsiz = MAX(NLM4_##argtype##_sz, NLM4_##restype##_sz) << 2 \ 554 .p_bufsiz = MAX(NLM4_##argtype##_sz, NLM4_##restype##_sz) << 2, \
555 .p_statidx = NLMPROC_##proc, \
556 .p_name = #proc, \
555 } 557 }
556 558
557static struct rpc_procinfo nlm4_procedures[] = { 559static struct rpc_procinfo nlm4_procedures[] = {