debug.h 832 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #ifndef LINUX_LOCKD_DEBUG_H
  9. #define LINUX_LOCKD_DEBUG_H
  10. #ifdef __KERNEL__
  11. #include <linux/sunrpc/debug.h>
  12. /*
  13. * Enable lockd debugging.
  14. * Requires RPC_DEBUG.
  15. */
  16. #undef ifdebug
  17. #if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
  18. # define ifdebug(flag) if (unlikely(nlm_debug & NLMDBG_##flag))
  19. #else
  20. # define ifdebug(flag) if (0)
  21. #endif
  22. #endif /* __KERNEL__ */
  23. /*
  24. * Debug flags
  25. */
  26. #define NLMDBG_SVC 0x0001
  27. #define NLMDBG_CLIENT 0x0002
  28. #define NLMDBG_CLNTLOCK 0x0004
  29. #define NLMDBG_SVCLOCK 0x0008
  30. #define NLMDBG_MONITOR 0x0010
  31. #define NLMDBG_CLNTSUBS 0x0020
  32. #define NLMDBG_SVCSUBS 0x0040
  33. #define NLMDBG_HOSTCACHE 0x0080
  34. #define NLMDBG_XDR 0x0100
  35. #define NLMDBG_ALL 0x7fff
  36. #endif /* LINUX_LOCKD_DEBUG_H */