[Devel] [PATCH RH7 3/9] Port: diff-fence-watchdog-write-log -message-when-timer-elapses

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Tue Oct 13 07:52:53 PDT 2015


Author: Dmitry Guryanov
Email: dguryanov at parallels.com
Subject: watchdog: write log message when timer elapses
Date: Fri, 15 Feb 2013 18:00:41 +0400

* [fence-watchdog] a message is printed if the node is fenced
	by watchdog (PSBM-18312)

It's not possible to identify reason of reboot, so let's
write the log message.

https://jira.sw.ru/browse/PSBM-18312

changes in v2:
use bust_spinlocks, so that printk will never hang

Signed-off-by: Dmitry Guryanov <dguryanov at parallels.com>
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 kernel/fence-watchdog.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/kernel/fence-watchdog.c b/kernel/fence-watchdog.c
index ca07da5..7938fcb 100644
--- a/kernel/fence-watchdog.c
+++ b/kernel/fence-watchdog.c
@@ -37,6 +37,11 @@ void fence_wdog_do_fence(void)
 {
 	char *killer = NULL;
 
+	bust_spinlocks(1);
+	printk(KERN_EMERG"fence-watchdog: %s\n",
+			action_names[fence_wdog_action]);
+	bust_spinlocks(0);
+
 	switch (fence_wdog_action) {
 	case FENCE_WDOG_CRASH:
 		panic_on_oops = 1;
@@ -52,7 +57,6 @@ void fence_wdog_do_fence(void)
 		lockdep_off();
 		local_irq_enable();
 		sysdev_shutdown();
-		printk(KERN_EMERG "System halted.\n");
 		kmsg_dump(KMSG_DUMP_HALT);
 		machine_halt();
 		break;
-- 
1.9.3




More information about the Devel mailing list