Author: Dmitry Guryanov
Email: dgurya...@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 <dgurya...@parallels.com>
Signed-off-by: Pavel Tikhomirov <ptikhomi...@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

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to