diff options
author | Chuck Lever <cel@netapp.com> | 2006-03-20 13:44:22 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:22 -0500 |
commit | cc0175c1dc1de8f6af0eb0631dcc5b999a6fcc42 (patch) | |
tree | b219a9c16f0ef3ff0982450c32aa0f09d503782a /fs/nfs | |
parent | 4ece3a2d18fd7fe1d4972284a8c98c569020093f (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/nfs')
-rw-r--r-- | fs/nfs/mount_clnt.c | 4 | ||||
-rw-r--r-- | fs/nfs/nfs2xdr.c | 4 | ||||
-rw-r--r-- | fs/nfs/nfs3xdr.c | 6 | ||||
-rw-r--r-- | fs/nfs/nfs4xdr.c | 2 |
4 files changed, 14 insertions, 2 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index db99b8f678f8..4a1340358223 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c | |||
@@ -137,6 +137,8 @@ static struct rpc_procinfo mnt_procedures[] = { | |||
137 | .p_encode = (kxdrproc_t) xdr_encode_dirpath, | 137 | .p_encode = (kxdrproc_t) xdr_encode_dirpath, |
138 | .p_decode = (kxdrproc_t) xdr_decode_fhstatus, | 138 | .p_decode = (kxdrproc_t) xdr_decode_fhstatus, |
139 | .p_bufsiz = MNT_dirpath_sz << 2, | 139 | .p_bufsiz = MNT_dirpath_sz << 2, |
140 | .p_statidx = MNTPROC_MNT, | ||
141 | .p_name = "MOUNT", | ||
140 | }, | 142 | }, |
141 | }; | 143 | }; |
142 | 144 | ||
@@ -146,6 +148,8 @@ static struct rpc_procinfo mnt3_procedures[] = { | |||
146 | .p_encode = (kxdrproc_t) xdr_encode_dirpath, | 148 | .p_encode = (kxdrproc_t) xdr_encode_dirpath, |
147 | .p_decode = (kxdrproc_t) xdr_decode_fhstatus3, | 149 | .p_decode = (kxdrproc_t) xdr_decode_fhstatus3, |
148 | .p_bufsiz = MNT_dirpath_sz << 2, | 150 | .p_bufsiz = MNT_dirpath_sz << 2, |
151 | .p_statidx = MOUNTPROC3_MNT, | ||
152 | .p_name = "MOUNT", | ||
149 | }, | 153 | }, |
150 | }; | 154 | }; |
151 | 155 | ||
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c index 7fc0560c89c9..8cdc792ff3c7 100644 --- a/fs/nfs/nfs2xdr.c +++ b/fs/nfs/nfs2xdr.c | |||
@@ -682,7 +682,9 @@ nfs_stat_to_errno(int stat) | |||
682 | .p_encode = (kxdrproc_t) nfs_xdr_##argtype, \ | 682 | .p_encode = (kxdrproc_t) nfs_xdr_##argtype, \ |
683 | .p_decode = (kxdrproc_t) nfs_xdr_##restype, \ | 683 | .p_decode = (kxdrproc_t) nfs_xdr_##restype, \ |
684 | .p_bufsiz = MAX(NFS_##argtype##_sz,NFS_##restype##_sz) << 2, \ | 684 | .p_bufsiz = MAX(NFS_##argtype##_sz,NFS_##restype##_sz) << 2, \ |
685 | .p_timer = timer \ | 685 | .p_timer = timer, \ |
686 | .p_statidx = NFSPROC_##proc, \ | ||
687 | .p_name = #proc, \ | ||
686 | } | 688 | } |
687 | struct rpc_procinfo nfs_procedures[] = { | 689 | struct rpc_procinfo nfs_procedures[] = { |
688 | PROC(GETATTR, fhandle, attrstat, 1), | 690 | PROC(GETATTR, fhandle, attrstat, 1), |
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index b6c0b5012bce..2d8701a230f0 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c | |||
@@ -1109,7 +1109,9 @@ nfs3_xdr_setaclres(struct rpc_rqst *req, u32 *p, struct nfs_fattr *fattr) | |||
1109 | .p_encode = (kxdrproc_t) nfs3_xdr_##argtype, \ | 1109 | .p_encode = (kxdrproc_t) nfs3_xdr_##argtype, \ |
1110 | .p_decode = (kxdrproc_t) nfs3_xdr_##restype, \ | 1110 | .p_decode = (kxdrproc_t) nfs3_xdr_##restype, \ |
1111 | .p_bufsiz = MAX(NFS3_##argtype##_sz,NFS3_##restype##_sz) << 2, \ | 1111 | .p_bufsiz = MAX(NFS3_##argtype##_sz,NFS3_##restype##_sz) << 2, \ |
1112 | .p_timer = timer \ | 1112 | .p_timer = timer, \ |
1113 | .p_statidx = NFS3PROC_##proc, \ | ||
1114 | .p_name = #proc, \ | ||
1113 | } | 1115 | } |
1114 | 1116 | ||
1115 | struct rpc_procinfo nfs3_procedures[] = { | 1117 | struct rpc_procinfo nfs3_procedures[] = { |
@@ -1150,6 +1152,7 @@ static struct rpc_procinfo nfs3_acl_procedures[] = { | |||
1150 | .p_decode = (kxdrproc_t) nfs3_xdr_getaclres, | 1152 | .p_decode = (kxdrproc_t) nfs3_xdr_getaclres, |
1151 | .p_bufsiz = MAX(ACL3_getaclargs_sz, ACL3_getaclres_sz) << 2, | 1153 | .p_bufsiz = MAX(ACL3_getaclargs_sz, ACL3_getaclres_sz) << 2, |
1152 | .p_timer = 1, | 1154 | .p_timer = 1, |
1155 | .p_name = "GETACL", | ||
1153 | }, | 1156 | }, |
1154 | [ACLPROC3_SETACL] = { | 1157 | [ACLPROC3_SETACL] = { |
1155 | .p_proc = ACLPROC3_SETACL, | 1158 | .p_proc = ACLPROC3_SETACL, |
@@ -1157,6 +1160,7 @@ static struct rpc_procinfo nfs3_acl_procedures[] = { | |||
1157 | .p_decode = (kxdrproc_t) nfs3_xdr_setaclres, | 1160 | .p_decode = (kxdrproc_t) nfs3_xdr_setaclres, |
1158 | .p_bufsiz = MAX(ACL3_setaclargs_sz, ACL3_setaclres_sz) << 2, | 1161 | .p_bufsiz = MAX(ACL3_setaclargs_sz, ACL3_setaclres_sz) << 2, |
1159 | .p_timer = 0, | 1162 | .p_timer = 0, |
1163 | .p_name = "SETACL", | ||
1160 | }, | 1164 | }, |
1161 | }; | 1165 | }; |
1162 | 1166 | ||
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 4bbf5ef57785..b95675349ba3 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -4344,6 +4344,8 @@ nfs_stat_to_errno(int stat) | |||
4344 | .p_encode = (kxdrproc_t) nfs4_xdr_##argtype, \ | 4344 | .p_encode = (kxdrproc_t) nfs4_xdr_##argtype, \ |
4345 | .p_decode = (kxdrproc_t) nfs4_xdr_##restype, \ | 4345 | .p_decode = (kxdrproc_t) nfs4_xdr_##restype, \ |
4346 | .p_bufsiz = MAX(NFS4_##argtype##_sz,NFS4_##restype##_sz) << 2, \ | 4346 | .p_bufsiz = MAX(NFS4_##argtype##_sz,NFS4_##restype##_sz) << 2, \ |
4347 | .p_statidx = NFSPROC4_CLNT_##proc, \ | ||
4348 | .p_name = #proc, \ | ||
4347 | } | 4349 | } |
4348 | 4350 | ||
4349 | struct rpc_procinfo nfs4_procedures[] = { | 4351 | struct rpc_procinfo nfs4_procedures[] = { |