linux-xiaomi-chiron/include/linux/sunrpc
Dave Wysochanski 016583d703 sunrpc: Change rpc_print_iostats to rpc_clnt_show_stats and handle rpc_clnt clones
The existing rpc_print_iostats has a few shortcomings.  First, the naming
is not consistent with other functions in the kernel that display stats.
Second, it is really displaying stats for an rpc_clnt structure as it
displays both xprt stats and per-op stats.  Third, it does not handle
rpc_clnt clones, which is important for the one in-kernel tree caller
of this function, the NFS client's nfs_show_stats function.

Fix all of the above by renaming the rpc_print_iostats to
rpc_clnt_show_stats and looping through any rpc_clnt clones via
cl_parent.

Once this interface is fixed, this addresses a problem with NFSv4.
Before this patch, the /proc/self/mountstats always showed incorrect
counts for NFSv4 lease and session related opcodes such as SEQUENCE,
RENEW, SETCLIENTID, CREATE_SESSION, etc.  These counts were always 0
even though many ops would go over the wire.  The reason for this is
there are multiple rpc_clnt structures allocated for any given NFSv4
mount, and inside nfs_show_stats() we callled into rpc_print_iostats()
which only handled one of them, nfs_server->client.  Fix these counts
by calling sunrpc's new rpc_clnt_show_stats() function, which handles
cloned rpc_clnt structs and prints the stats together.

Note that one side-effect of the above is that multiple mounts from
the same NFS server will show identical counts in the above ops due
to the fact the one rpc_clnt (representing the NFSv4 client state)
is shared across mounts.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2018-07-31 12:53:35 -04:00
..
addr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
auth.h net/sunrpc: Make rpc_auth_create_args a const 2018-07-30 13:19:41 -04:00
auth_gss.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bc_xprt.h SUNRPC: Abstract backchannel operations 2015-11-02 13:45:15 -05:00
cache.h sunrpc: make the function arg as const 2017-11-27 16:45:11 -05:00
clnt.h xprtrdma: "Support" call-only RPCs 2018-04-10 16:06:22 -04:00
debug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gss_api.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
gss_asn1.h
gss_err.h
gss_krb5.h sunrpc: Use skcipher and ahash/shash 2016-01-27 20:36:01 +08:00
gss_krb5_enctypes.h
metrics.h sunrpc: Change rpc_print_iostats to rpc_clnt_show_stats and handle rpc_clnt clones 2018-07-31 12:53:35 -04:00
msg_prot.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rpc_pipe_fs.h remove rpc_rmdir() 2018-04-16 14:20:26 -04:00
rpc_rdma.h xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00
sched.h SUNRPC: Queue latency-sensitive socket tasks to xprtiod 2018-02-07 09:25:52 -05:00
stats.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
svc.h NFSD: Clean up legacy NFS SYMLINK argument XDR decoders 2018-04-03 15:08:16 -04:00
svc_rdma.h svcrdma: Remove unused svc_rdma_op_ctxt 2018-05-11 15:48:57 -04:00
svc_xprt.h sunrpc: Save remote presentation address in svc_xprt for trace events 2018-04-03 15:08:11 -04:00
svcauth.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
svcauth_gss.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
svcsock.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
timer.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
types.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xdr.h NFSv4; Clean up XDR encoding of type bitmap4 2018-04-10 16:06:22 -04:00
xprt.h xprtrdma: Make rpc_rqst part of rpcrdma_req 2018-05-07 09:20:03 -04:00
xprtmultipath.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xprtrdma.h xprtrdma: Add proper SPDX tags for NetApp-contributed source 2018-05-07 09:20:03 -04:00
xprtsock.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00