summaryrefslogtreecommitdiff
path: root/include/linux/sunrpc/debug.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-11-26 14:44:44 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-11-27 13:14:52 -0500
commit388f0c776781fe64ce951701bfe712b2182a31f2 (patch)
tree535e64ee7e52c96a16f80c2d71f2310d6f796b2b /include/linux/sunrpc/debug.h
parentb4b9d2ccf0be61c69213f6ae4e33377c05194ef4 (diff)
sunrpc: add a debugfs rpc_xprt directory with an info file in it
Add a new directory heirarchy under the debugfs sunrpc/ directory: sunrpc/ rpc_xprt/ <xprt id>/ Within that directory, we can put files that give info about the xprts. We do have the (minor) problem that there is no succinct, unique identifier for rpc_xprts. So we generate them synthetically with a static atomic_t counter. For now, this directory just holds an "info" file, but we may add other files to it in the future. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'include/linux/sunrpc/debug.h')
-rw-r--r--include/linux/sunrpc/debug.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index 835339707094..c57d8ea0716c 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -55,6 +55,7 @@ extern unsigned int nlm_debug;
*/
struct rpc_clnt;
+struct rpc_xprt;
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
void rpc_register_sysctl(void);
@@ -63,6 +64,8 @@ int sunrpc_debugfs_init(void);
void sunrpc_debugfs_exit(void);
int rpc_clnt_debugfs_register(struct rpc_clnt *);
void rpc_clnt_debugfs_unregister(struct rpc_clnt *);
+int rpc_xprt_debugfs_register(struct rpc_xprt *);
+void rpc_xprt_debugfs_unregister(struct rpc_xprt *);
#else
static inline int
sunrpc_debugfs_init(void)
@@ -87,6 +90,18 @@ rpc_clnt_debugfs_unregister(struct rpc_clnt *clnt)
{
return;
}
+
+static inline int
+rpc_xprt_debugfs_register(struct rpc_xprt *xprt)
+{
+ return 0;
+}
+
+static inline void
+rpc_xprt_debugfs_unregister(struct rpc_xprt *xprt)
+{
+ return;
+}
#endif
#endif /* _LINUX_SUNRPC_DEBUG_H_ */