Skip to contentSkip to conversation

nfsstat: show client rpc information correctly

PATCH In review Kinglong Mee 3 participants 3 messages Dec 24, 2015 – Jan 16, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfsstat: show client rpc information correctly

There are 59 client rpc procedures, not 60.

The order of rpc name must be the same as define of NFSPROC4_CLNT_xx in include/linux/nfs4.h, not nfs4_procedures in nfs4xdr.c.

Drop duplicate rpc name "getdevlist".

---
 utils/nfsstat/nfsstat.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
utils/nfsstat/nfsstat.c +2 -3
index b67f0aa..8376347 100644
@@ -31,7 +31,7 @@ enum {
 	SRVPROC3_SZ = 22,
 	CLTPROC3_SZ = 22,
 	SRVPROC4_SZ = 2,
-	CLTPROC4_SZ = 60,
+	CLTPROC4_SZ = 59,
 	SRVPROC4OPS_SZ = 71,
 };
 
@@ -135,11 +135,10 @@ static const char *	nfscltproc4name[CLTPROC4_SZ] = {
 	"sequence",
 	"get_lease_time",
 	"reclaim_comp",
-	"getdevinfo",
 	"layoutget",
+	"getdevinfo",
 	"layoutcommit",
 	"layoutreturn",
-	"getdevlist",
 	"secinfo_no",
 	"test_stateid",
 	"free_stateid",
Signature · 1 line
2.5.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines

There are 59 client rpc procedures, not 60.

The order of rpc name must be the same as define of NFSPROC4_CLNT_xx in include/linux/nfs4.h, not nfs4_procedures in nfs4xdr.c.

Thanks for fixing this -- I did not look very closely at the #define PROC(proc, argtype, restype) and missed the designated initializer.

It looks like we don't keep track of stats for NULL, then. That seems like a minor problem -- but maybe we shouldn't be pretending we are keeping track of it.

Quoted 3 lines

Drop duplicate rpc name "getdevlist".

Quoted 34 lines
---
 utils/nfsstat/nfsstat.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
utils/nfsstat/nfsstat.c +2 -4
index b67f0aa..8376347 100644
@@ -31,7 +31,7 @@ enum {
 	SRVPROC3_SZ = 22,
 	CLTPROC3_SZ = 22,
 	SRVPROC4_SZ = 2,
-	CLTPROC4_SZ = 60,
+	CLTPROC4_SZ = 59,
 	SRVPROC4OPS_SZ = 71,
 };
 
@@ -135,11 +135,10 @@ static const char *	nfscltproc4name[CLTPROC4_SZ] = {
 	"sequence",
 	"get_lease_time",
 	"reclaim_comp",
-	"getdevinfo",
 	"layoutget",
+	"getdevinfo",
 	"layoutcommit",
 	"layoutreturn",
-	"getdevlist",
 	"secinfo_no",
 	"test_stateid",
 	"free_stateid",
--

2.5.0

#2 lore raw
In reply to Kinglong Mee
Quoted 9 lines · Kinglong Mee

There are 59 client rpc procedures, not 60.

The order of rpc name must be the same as define of NFSPROC4_CLNT_xx in include/linux/nfs4.h, not nfs4_procedures in nfs4xdr.c.

Drop duplicate rpc name "getdevlist".

Committed! Thanks!

steved.

Quoted 31 lines
---
 utils/nfsstat/nfsstat.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
utils/nfsstat/nfsstat.c +2 -3
index b67f0aa..8376347 100644
@@ -31,7 +31,7 @@ enum {
 	SRVPROC3_SZ = 22,
 	CLTPROC3_SZ = 22,
 	SRVPROC4_SZ = 2,
-	CLTPROC4_SZ = 60,
+	CLTPROC4_SZ = 59,
 	SRVPROC4OPS_SZ = 71,
 };
 
@@ -135,11 +135,10 @@ static const char *	nfscltproc4name[CLTPROC4_SZ] = {
 	"sequence",
 	"get_lease_time",
 	"reclaim_comp",
-	"getdevinfo",
 	"layoutget",
+	"getdevinfo",
 	"layoutcommit",
 	"layoutreturn",
-	"getdevlist",
 	"secinfo_no",
 	"test_stateid",
 	"free_stateid",