blob: e536c579827f116bf819c76a50467056ae51affc [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
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 Torvalds1da177e2005-04-16 15:20:36 -070021#undef ifdebug
Jeff Layton10b89562014-11-17 16:58:03 -050022#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
Linus Torvalds1da177e2005-04-16 15:20:36 -070023# 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 Torvalds1da177e2005-04-16 15:20:36 -070044#endif /* LINUX_LOCKD_DEBUG_H */