summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/sunrpc_syms.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-11-26 20:44:43 +0100
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-11-27 19:14:51 +0100
commitb4b9d2ccf0be61c69213f6ae4e33377c05194ef4 (patch)
tree54709e972d890b22b6de65124f87953534aaa9a3 /net/sunrpc/sunrpc_syms.c
parentMerge tag 'nfs-rdma-for-3.19' of git://git.linux-nfs.org/projects/anna/nfs-rd... (diff)
downloadlinux-b4b9d2ccf0be61c69213f6ae4e33377c05194ef4.tar.xz
linux-b4b9d2ccf0be61c69213f6ae4e33377c05194ef4.zip
sunrpc: add debugfs file for displaying client rpc_task queue
It's possible to get a dump of the RPC task queue by writing a value to /proc/sys/sunrpc/rpc_debug. If you write any value to that file, you get a dump of the RPC client task list into the log buffer. This is a rather inconvenient interface however, and makes it hard to get immediate info about the task queue. Add a new directory hierarchy under debugfs: sunrpc/ rpc_clnt/ <clientid>/ Within each clientid directory we create a new "tasks" file that will dump info similar to what shows up in the log buffer, but with a few small differences -- we avoid printing raw kernel addresses in favor of symbolic names and the XID is also displayed. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc/sunrpc_syms.c')
-rw-r--r--net/sunrpc/sunrpc_syms.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index f632e476ab6c..e37fbed87956 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -97,6 +97,11 @@ init_sunrpc(void)
err = register_rpc_pipefs();
if (err)
goto out4;
+
+ err = sunrpc_debugfs_init();
+ if (err)
+ goto out5;
+
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
rpc_register_sysctl();
#endif
@@ -104,6 +109,8 @@ init_sunrpc(void)
init_socket_xprt(); /* clnt sock transport */
return 0;
+out5:
+ unregister_rpc_pipefs();
out4:
unregister_pernet_subsys(&sunrpc_net_ops);
out3:
@@ -120,6 +127,7 @@ cleanup_sunrpc(void)
rpcauth_remove_module();
cleanup_socket_xprt();
svc_cleanup_xprt_sock();
+ sunrpc_debugfs_exit();
unregister_rpc_pipefs();
rpc_destroy_mempool();
unregister_pernet_subsys(&sunrpc_net_ops);