Skip to content

Commit

Permalink
spl: make 'spl_panic_halt' working for all cases
Browse files Browse the repository at this point in the history
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 openzfs#12120
Closes openzfs#13109
  • Loading branch information
szubersk authored and andrewc12 committed Sep 23, 2022
1 parent 9490443 commit d5fc2e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions module/os/linux/spl/spl-err.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit d5fc2e4

Please sign in to comment.