mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
b4b9d2ccf0
commit
388f0c7767
4 changed files with 134 additions and 7 deletions
|
@ -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_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue