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