Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/include/linux/lockd/debug.h |
| 3 | * |
| 4 | * Debugging stuff. |
| 5 | * |
| 6 | * Copyright (C) 1996 Olaf Kirch <okir@monad.swb.de> |
| 7 | */ |
| 8 | |
| 9 | #ifndef LINUX_LOCKD_DEBUG_H |
| 10 | #define LINUX_LOCKD_DEBUG_H |
| 11 | |
| 12 | #ifdef __KERNEL__ |
| 13 | |
| 14 | #include <linux/sunrpc/debug.h> |
| 15 | |
| 16 | /* |
| 17 | * Enable lockd debugging. |
| 18 | * Requires RPC_DEBUG. |
| 19 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | #undef ifdebug |
Jeff Layton | 10b8956 | 2014-11-17 16:58:03 -0500 | [diff] [blame] | 21 | #if IS_ENABLED(CONFIG_SUNRPC_DEBUG) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 22 | # define ifdebug(flag) if (unlikely(nlm_debug & NLMDBG_##flag)) |
| 23 | #else |
| 24 | # define ifdebug(flag) if (0) |
| 25 | #endif |
| 26 | |
| 27 | #endif /* __KERNEL__ */ |
| 28 | |
| 29 | /* |
| 30 | * Debug flags |
| 31 | */ |
| 32 | #define NLMDBG_SVC 0x0001 |
| 33 | #define NLMDBG_CLIENT 0x0002 |
| 34 | #define NLMDBG_CLNTLOCK 0x0004 |
| 35 | #define NLMDBG_SVCLOCK 0x0008 |
| 36 | #define NLMDBG_MONITOR 0x0010 |
| 37 | #define NLMDBG_CLNTSUBS 0x0020 |
| 38 | #define NLMDBG_SVCSUBS 0x0040 |
| 39 | #define NLMDBG_HOSTCACHE 0x0080 |
| 40 | #define NLMDBG_XDR 0x0100 |
| 41 | #define NLMDBG_ALL 0x7fff |
| 42 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 43 | #endif /* LINUX_LOCKD_DEBUG_H */ |