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 <behlendorf1@llnl.gov>
Authored-by: Wojciech Nizinski <w.nizinski@grinn-global.com>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Closes #12120
Closes #13109
This commit is contained in:
Damian Szuberski 2022-02-18 19:43:11 +00:00 committed by GitHub
parent 15b982492a
commit a014378dd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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 */