Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[WATCHDOG] clarify watchdog operation in documentation

It was not clear what the difference is/was between the
nowayout feature and the Magic Close feature.

Signed-off-by: "Andrew Dyer" <amdyer@gmail.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

authored by

Andrew Dyer and committed by
Wim Van Sebroeck
0d710cba cde10ba3

+20 -16
+20 -16
Documentation/watchdog/watchdog-api.txt
··· 42 42 A more advanced driver could for example check that a HTTP server is 43 43 still responding before doing the write call to ping the watchdog. 44 44 45 - When the device is closed, the watchdog is disabled. This is not 46 - always such a good idea, since if there is a bug in the watchdog 47 - daemon and it crashes the system will not reboot. Because of this, 48 - some of the drivers support the configuration option "Disable watchdog 49 - shutdown on close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when 50 - compiling the kernel, there is no way of disabling the watchdog once 51 - it has been started. So, if the watchdog daemon crashes, the system 52 - will reboot after the timeout has passed. Watchdog devices also usually 53 - support the nowayout module parameter so that this option can be controlled 54 - at runtime. 45 + When the device is closed, the watchdog is disabled, unless the "Magic 46 + Close" feature is supported (see below). This is not always such a 47 + good idea, since if there is a bug in the watchdog daemon and it 48 + crashes the system will not reboot. Because of this, some of the 49 + drivers support the configuration option "Disable watchdog shutdown on 50 + close", CONFIG_WATCHDOG_NOWAYOUT. If it is set to Y when compiling 51 + the kernel, there is no way of disabling the watchdog once it has been 52 + started. So, if the watchdog daemon crashes, the system will reboot 53 + after the timeout has passed. Watchdog devices also usually support 54 + the nowayout module parameter so that this option can be controlled at 55 + runtime. 55 56 56 - Drivers will not disable the watchdog, unless a specific magic character 'V' 57 - has been sent /dev/watchdog just before closing the file. If the userspace 58 - daemon closes the file without sending this special character, the driver 59 - will assume that the daemon (and userspace in general) died, and will stop 60 - pinging the watchdog without disabling it first. This will then cause a 61 - reboot if the watchdog is not re-opened in sufficient time. 57 + Magic Close feature: 58 + 59 + If a driver supports "Magic Close", the driver will not disable the 60 + watchdog unless a specific magic character 'V' has been sent to 61 + /dev/watchdog just before closing the file. If the userspace daemon 62 + closes the file without sending this special character, the driver 63 + will assume that the daemon (and userspace in general) died, and will 64 + stop pinging the watchdog without disabling it first. This will then 65 + cause a reboot if the watchdog is not re-opened in sufficient time. 62 66 63 67 The ioctl API: 64 68