aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/debug.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 18:13:13 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-10 18:13:13 -0500
commite20db597b6264de55ea6636fc79b1e4aaa89d129 (patch)
treefa650cb9cfad4b22598ae9867ca92baf57491a9d /include/linux/sunrpc/debug.h
parent3a5dc1fafb016560315fe45bb4ef8bde259dd1bc (diff)
parent388f0c776781fe64ce951701bfe712b2182a31f2 (diff)
Merge tag 'nfs-for-3.19-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust: "Highlights include: Features: - NFSv4.2 client support for hole punching and preallocation. - Further RPC/RDMA client improvements. - Add more RPC transport debugging tracepoints. - Add RPC debugging tools in debugfs. Bugfixes: - Stable fix for layoutget error handling - Fix a change in COMMIT behaviour resulting from the recent io code updates" * tag 'nfs-for-3.19-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (28 commits) sunrpc: add a debugfs rpc_xprt directory with an info file in it sunrpc: add debugfs file for displaying client rpc_task queue nfs: Add DEALLOCATE support nfs: Add ALLOCATE support NFS: Clean up nfs4_init_callback() NFS: SETCLIENTID XDR buffer sizes are incorrect SUNRPC: serialize iostats updates xprtrdma: Display async errors xprtrdma: Enable pad optimization xprtrdma: Re-write rpcrdma_flush_cqs() xprtrdma: Refactor tasklet scheduling xprtrdma: unmap all FMRs during transport disconnect xprtrdma: Cap req_cqinit xprtrdma: Return an errno from rpcrdma_register_external() nfs: define nfs_inc_fscache_stats and using it as possible nfs: replace nfs_add_stats with nfs_inc_stats when add one NFS: Deletion of unnecessary checks before the function call "nfs_put_client" sunrpc: eliminate RPC_TRACEPOINTS sunrpc: eliminate RPC_DEBUG lockd: eliminate LOCKD_DEBUG ...
Diffstat (limited to 'include/linux/sunrpc/debug.h')
-rw-r--r--include/linux/sunrpc/debug.h64
1 files changed, 49 insertions, 15 deletions
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h
index 9385bd74c860..c57d8ea0716c 100644
--- a/include/linux/sunrpc/debug.h
+++ b/include/linux/sunrpc/debug.h
@@ -10,22 +10,10 @@
10 10
11#include <uapi/linux/sunrpc/debug.h> 11#include <uapi/linux/sunrpc/debug.h>
12 12
13
14/*
15 * Enable RPC debugging/profiling.
16 */
17#ifdef CONFIG_SUNRPC_DEBUG
18#define RPC_DEBUG
19#endif
20#ifdef CONFIG_TRACEPOINTS
21#define RPC_TRACEPOINTS
22#endif
23/* #define RPC_PROFILE */
24
25/* 13/*
26 * Debugging macros etc 14 * Debugging macros etc
27 */ 15 */
28#ifdef RPC_DEBUG 16#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
29extern unsigned int rpc_debug; 17extern unsigned int rpc_debug;
30extern unsigned int nfs_debug; 18extern unsigned int nfs_debug;
31extern unsigned int nfsd_debug; 19extern unsigned int nfsd_debug;
@@ -36,7 +24,7 @@ extern unsigned int nlm_debug;
36#define dprintk_rcu(args...) dfprintk_rcu(FACILITY, ## args) 24#define dprintk_rcu(args...) dfprintk_rcu(FACILITY, ## args)
37 25
38#undef ifdebug 26#undef ifdebug
39#ifdef RPC_DEBUG 27#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
40# define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac)) 28# define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac))
41 29
42# define dfprintk(fac, args...) \ 30# define dfprintk(fac, args...) \
@@ -65,9 +53,55 @@ extern unsigned int nlm_debug;
65/* 53/*
66 * Sysctl interface for RPC debugging 54 * Sysctl interface for RPC debugging
67 */ 55 */
68#ifdef RPC_DEBUG 56
57struct rpc_clnt;
58struct rpc_xprt;
59
60#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
69void rpc_register_sysctl(void); 61void rpc_register_sysctl(void);
70void rpc_unregister_sysctl(void); 62void rpc_unregister_sysctl(void);
63int sunrpc_debugfs_init(void);
64void sunrpc_debugfs_exit(void);
65int rpc_clnt_debugfs_register(struct rpc_clnt *);
66void rpc_clnt_debugfs_unregister(struct rpc_clnt *);
67int rpc_xprt_debugfs_register(struct rpc_xprt *);
68void rpc_xprt_debugfs_unregister(struct rpc_xprt *);
69#else
70static inline int
71sunrpc_debugfs_init(void)
72{
73 return 0;
74}
75
76static inline void
77sunrpc_debugfs_exit(void)
78{
79 return;
80}
81
82static inline int
83rpc_clnt_debugfs_register(struct rpc_clnt *clnt)
84{
85 return 0;
86}
87
88static inline void
89rpc_clnt_debugfs_unregister(struct rpc_clnt *clnt)
90{
91 return;
92}
93
94static inline int
95rpc_xprt_debugfs_register(struct rpc_xprt *xprt)
96{
97 return 0;
98}
99
100static inline void
101rpc_xprt_debugfs_unregister(struct rpc_xprt *xprt)
102{
103 return;
104}
71#endif 105#endif
72 106
73#endif /* _LINUX_SUNRPC_DEBUG_H_ */ 107#endif /* _LINUX_SUNRPC_DEBUG_H_ */