Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b5b4c72 authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman
Browse files

staging/lustre/libcfs: restore LINVRNT



It was mistakenly removed by coan. Add it back and also with a new
Kconfig option to enable it.

Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d29dc2e4
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -72,7 +72,16 @@ do { \


#define LASSERT(cond) LASSERTF(cond, "\n")
#define LASSERT(cond) LASSERTF(cond, "\n")


#ifdef CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK
/**
 * This is for more expensive checks that one doesn't want to be enabled all
 * the time. LINVRNT() has to be explicitly enabled by
 * CONFIG_LUSTRE_DEBUG_EXPENSIVE_CHECK option.
 */
# define LINVRNT(exp) LASSERT(exp)
#else
# define LINVRNT(exp) ((void)sizeof!!(exp))
# define LINVRNT(exp) ((void)sizeof!!(exp))
#endif


#define KLASSERT(e) LASSERT(e)
#define KLASSERT(e) LASSERT(e)


+10 −0
Original line number Original line Diff line number Diff line
@@ -31,3 +31,13 @@ config LUSTRE_OBD_MAX_IOCTL_BUFFER
	  applications can pass to Lustre kernel module through ioctl interface.
	  applications can pass to Lustre kernel module through ioctl interface.


	  If unsure, use default.
	  If unsure, use default.

config LUSTRE_DEBUG_EXPENSIVE_CHECK
	bool "Enable Lustre DEBUG checks"
	depends on LUSTRE_FS
	default false
	help
	  This option is mainly for debug purpose. It enables Lustre code to do
	  expensive checks that may have a performance impact.

	  Use with caution. If unsure, say N.