From a014378dd010fb4f9bf5ab003bd27526ff898952 Mon Sep 17 00:00:00 2001 From: Damian Szuberski Date: Fri, 18 Feb 2022 19:43:11 +0000 Subject: [PATCH] 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 Authored-by: Wojciech Nizinski Signed-off-by: szubersk Closes #12120 Closes #13109 --- module/os/linux/spl/spl-err.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/os/linux/spl/spl-err.c b/module/os/linux/spl/spl-err.c index 70512c63c9..c84c39b56b 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 */