summaryrefslogtreecommitdiffstats
path: root/src/core/manager.h
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2021-09-06 08:26:30 +0200
committerFranck Bui <fbui@suse.com>2021-09-15 10:54:24 +0200
commitae4a0ec45c97024387f150305ada14c9117116f4 (patch)
tree430dfc71a0ef35cff1527f40a8676853bcd0d616 /src/core/manager.h
parentwatchdog: make watchdog_ping() a NOP when the watchdog is disabled or closed (diff)
downloadsystemd-ae4a0ec45c97024387f150305ada14c9117116f4.tar.xz
systemd-ae4a0ec45c97024387f150305ada14c9117116f4.zip
core: call watchdog_ping() unconditionally
This basically reverts commit 61927b9f116bf45bfdbf19dc2981d4a4f527ae5f and relies on the fact that watchdog_ping() will open and setup the watchdog for us in case the device appears later on. Also unlike what is said in comment https://github.com/systemd/systemd/pull/17460#pullrequestreview-517434377, both m->watchdog[] and m->overriden_watchdog[] are not supposed to store the actual timeout used by the watchdog device but stores the value defined by the user. If the HW timeout value is really needed by the manager then it's probably better to read it via an helper defined in watchdog.c instead. However the HW timeout value is currently only needed by the watchdog code itself mainly when it calculates the time for the next ping.
Diffstat (limited to 'src/core/manager.h')
-rw-r--r--src/core/manager.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/core/manager.h b/src/core/manager.h
index 1220c9fb16..4f1c6fec63 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -248,8 +248,6 @@ struct Manager {
usec_t watchdog[_WATCHDOG_TYPE_MAX];
usec_t watchdog_overridden[_WATCHDOG_TYPE_MAX];
- bool runtime_watchdog_running; /* Whether the runtime HW watchdog was started, so we know if we still need to get the real timeout from the hardware */
-
dual_timestamp timestamps[_MANAGER_TIMESTAMP_MAX];
/* Data specific to the device subsystem */
@@ -566,7 +564,6 @@ ManagerTimestamp manager_timestamp_initrd_mangle(ManagerTimestamp s);
usec_t manager_get_watchdog(Manager *m, WatchdogType t);
void manager_set_watchdog(Manager *m, WatchdogType t, usec_t timeout);
int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout);
-void manager_retry_runtime_watchdog(Manager *m);
const char* oom_policy_to_string(OOMPolicy i) _const_;
OOMPolicy oom_policy_from_string(const char *s) _pure_;