[Ocfs2-commits] mfasheh commits r2915 - branches/ocfs2-1.2/fs/ocfs2/cluster
svn-commits@oss.oracle.com
svn-commits at oss.oracle.com
Thu May 11 20:58:55 CDT 2006
Author: mfasheh
Signed-off-by: smushran
Date: 2006-05-11 20:58:54 -0500 (Thu, 11 May 2006)
New Revision: 2915
Modified:
branches/ocfs2-1.2/fs/ocfs2/cluster/heartbeat.c
branches/ocfs2-1.2/fs/ocfs2/cluster/ocfs2_heartbeat.h
Log:
Warn the user on a dead timeout mistmatch:
Print a warning to the user when a node with a different dead count
joins the region.
Signed-off-by: smushran
Modified: branches/ocfs2-1.2/fs/ocfs2/cluster/heartbeat.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/cluster/heartbeat.c 2006-05-11 21:01:37 UTC (rev 2914)
+++ branches/ocfs2-1.2/fs/ocfs2/cluster/heartbeat.c 2006-05-12 01:58:54 UTC (rev 2915)
@@ -646,6 +646,7 @@
hb_block->hb_seq = cpu_to_le64(cputime);
hb_block->hb_node = node_num;
hb_block->hb_generation = cpu_to_le64(generation);
+ hb_block->hb_dead_ms = cpu_to_le32(o2hb_dead_threshold * O2HB_REGION_TIMEOUT_MS);
/* This step must always happen last! */
hb_block->hb_cksum = cpu_to_le32(o2hb_compute_block_crc_le(reg,
@@ -773,6 +774,8 @@
struct o2nm_node *node;
struct o2hb_disk_heartbeat_block *hb_block = reg->hr_tmp_block;
u64 cputime;
+ unsigned int dead_ms = o2hb_dead_threshold * O2HB_REGION_TIMEOUT_MS;
+ unsigned int slot_dead_ms;
memcpy(hb_block, slot->ds_raw_block, reg->hr_block_bytes);
@@ -860,6 +863,23 @@
&o2hb_live_slots[slot->ds_node_num]);
slot->ds_equal_samples = 0;
+
+ /* We want to be sure that all nodes agree on the
+ * number of milliseconds before a node will be
+ * considered dead. The self-fencing timeout is
+ * computed from this value, and a discrepancy might
+ * result in heartbeat calling a node dead when it
+ * hasn't self-fenced yet. */
+ slot_dead_ms = le32_to_cpu(hb_block->hb_dead_ms);
+ if (slot_dead_ms && slot_dead_ms != dead_ms) {
+ /* TODO: Perhaps we can fail the region here. */
+ mlog(ML_ERROR, "Node %d on device %s has a dead count "
+ "of %u ms, but our count is %u ms.\n"
+ "Please double check your configuration values "
+ "for 'O2CB_HEARTBEAT_THRESHOLD'\n",
+ slot->ds_node_num, reg->hr_dev_name, slot_dead_ms,
+ dead_ms);
+ }
goto out;
}
Modified: branches/ocfs2-1.2/fs/ocfs2/cluster/ocfs2_heartbeat.h
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/cluster/ocfs2_heartbeat.h 2006-05-11 21:01:37 UTC (rev 2914)
+++ branches/ocfs2-1.2/fs/ocfs2/cluster/ocfs2_heartbeat.h 2006-05-12 01:58:54 UTC (rev 2915)
@@ -32,6 +32,7 @@
__u8 hb_pad1[3];
__le32 hb_cksum;
__le64 hb_generation;
+ __le32 hb_dead_ms;
};
#endif /* _OCFS2_HEARTBEAT_H */
More information about the Ocfs2-commits
mailing list