aboutsummaryrefslogtreecommitdiffstats
path: root/module/os
diff options
context:
space:
mode:
authorDamian Szuberski <[email protected]>2022-02-18 19:43:11 +0000
committerGitHub <[email protected]>2022-02-18 11:43:11 -0800
commita014378dd010fb4f9bf5ab003bd27526ff898952 (patch)
treee58bbff3e43df46687d4e30137165fe4a51f3924 /module/os
parent15b982492a1fa8a3e75efd06b263121eda70e3a1 (diff)
spl: make 'spl_panic_halt' working for all cases
The default behavior where the serious ZFS errors cause FS thread to stuck is very bad for some production scenario. In some production scenarios (Linux), it is recommended to make real kernel PANIC, where system can be rebooted by watchdog or kernel itself. This patch enables coherent handling of spl_panic_halt parameter. Reviewed by: Brian Behlendorf <[email protected]> Authored-by: Wojciech Nizinski <[email protected]> Signed-off-by: szubersk <[email protected]> Closes #12120 Closes #13109
Diffstat (limited to 'module/os')
-rw-r--r--module/os/linux/spl/spl-err.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/module/os/linux/spl/spl-err.c b/module/os/linux/spl/spl-err.c
index 70512c63c..c84c39b56 100644
--- a/module/os/linux/spl/spl-err.c
+++ b/module/os/linux/spl/spl-err.c
@@ -100,6 +100,9 @@ vcmn_err(int ce, const char *fmt, va_list ap)
break;
case CE_PANIC:
printk(KERN_EMERG "PANIC: %s\n", msg);
+ if (spl_panic_halt)
+ panic("%s", msg);
+
spl_dumpstack();
/* Halt the thread to facilitate further debugging */