Rename Disk Heartbeat Timeout Parameter
Wengang ( wen.gang.wang@oracle.com ) Aug. 8, 2007
Goals
- ocfs2 offers a way to set a heartbeat timeout, one can set value for O2CB_HEARTBEAT_THRESHOLD to do that. but the value for the parameter is ((Heartbeat timeout in secs)/2+1), it's a indirect value and not friendly to users. By this small project, we will offer users a new way to set the timeout instead of the old way.
TODOs
configuration file
- new parameter O2CB_HEARTBEAT_TIMEOUT_MS is introduced. It's the it's the heartbeat timeout in milli-seconds with default value 60000.
- the old parameter O2CB_HEARTBEAT_THRESHOLD is obsolete.
- old configuration file with O2CB_HEARTBEAT_THRESHOLD parameter is supported. while, it will be converted to the new format when used.
/etc/init.d/o2cb
when detect that O2CB_HEARTBEAT_THRESHOLD exits in configuration file do the 3 action below:
convert value for O2CB_HEARTBEAT_THRESHOLD to value for O2CB_HEARTBEAT_TIMEOUT_MS (newvalue=(oldvalue-1)*2000).
- remove O2CB_HEARTBEAT_THRESHOLD from configuration file.
- add O2CB_HEARTBEAT_TIMEOUT_MS into configuration file.
- set value for the new O2CB_HEARTBEAT_TIMEOUT_MS instead of the old one into kernel.
kernel module
change proc entry /proc/../hb_dead_threshold to /proc/../hb_timeout_ms
- remove o2hb_dead_threshold variable which is used to store the "THRESHOLD" value.
- add o2hb_dead_timeout_ms to store the "TIMEOUT_MS" value.
- for places where "THRESHOLD" value is used, use ("TIMEOUT_MS"/2000 +1) instead.
Over