summaryrefslogtreecommitdiff
path: root/fs/xfs/Kconfig
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2017-06-15 07:29:13 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2017-06-19 18:59:10 +0300
commit1040960efaabb8e6c87633c7becbb51fc99d4b9b (patch)
tree748f34ddc548e817ac3ec698d943c0ee10ac3444 /fs/xfs/Kconfig
parentccdab3d6e881649f05110d9098fd248d2753aaf3 (diff)
downloadlinux-1040960efaabb8e6c87633c7becbb51fc99d4b9b.tar.xz
xfs: define fatal assert build time tunable
While configurable at runtime, the DEBUG mode assert failure behavior is usually either desired or not for a particular situation. For example, developers using kernel modules may prefer for fatal asserts to remain disabled across module reloads while QE engineers doing broad regression testing may prefer to have fatal asserts enabled on boot to facilitate data collection for bug reports. To provide a compromise/convenience for developers, create a Kconfig option that sets the default value of the DEBUG mode 'bug_on_assert' sysfs tunable. The default behavior remains to trigger kernel BUGs on assert failures to preserve existing behavior across kernel configuration updates with DEBUG mode enabled. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/Kconfig')
-rw-r--r--fs/xfs/Kconfig13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/xfs/Kconfig b/fs/xfs/Kconfig
index 35faf128f36d..1b98cfa342ab 100644
--- a/fs/xfs/Kconfig
+++ b/fs/xfs/Kconfig
@@ -96,3 +96,16 @@ config XFS_DEBUG
not useful unless you are debugging a particular problem.
Say N unless you are an XFS developer, or you play one on TV.
+
+config XFS_ASSERT_FATAL
+ bool "XFS fatal asserts"
+ default y
+ depends on XFS_FS && XFS_DEBUG
+ help
+ Set the default DEBUG mode ASSERT failure behavior.
+
+ Say Y here to cause DEBUG mode ASSERT failures to result in fatal
+ errors that BUG() the kernel by default. If you say N, ASSERT failures
+ result in warnings.
+
+ This behavior can be modified at runtime via sysfs.