From a7215794effd74a8a123e9c6533ef9aeda887147 Mon Sep 17 00:00:00 2001 From: Sunil Mushran Date: Wed, 6 Oct 2010 17:55:21 -0700 Subject: [PATCH] --- yaml --- r: 212791 b: refs/heads/master c: 823a637ae933fde8fdb280612dd3ff9912e301e3 h: refs/heads/master i: 212789: b6a8968da3657ba5d010fc8cf982331460200d60 212787: b496b9717a7d413762f9f32dbfcc97dd07bc6d5a 212783: 4360815918c6aff2789fca813c13ca5dbb3c90b0 v: v3 --- [refs] | 2 +- trunk/fs/ocfs2/cluster/heartbeat.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2d94e73339af..fdd0d0993711 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8ca8b0bbd841b6bcd8ac05e51b0143aa61cfeff3 +refs/heads/master: 823a637ae933fde8fdb280612dd3ff9912e301e3 diff --git a/trunk/fs/ocfs2/cluster/heartbeat.c b/trunk/fs/ocfs2/cluster/heartbeat.c index 16e49765c853..188f50269b89 100644 --- a/trunk/fs/ocfs2/cluster/heartbeat.c +++ b/trunk/fs/ocfs2/cluster/heartbeat.c @@ -174,6 +174,9 @@ struct o2hb_region { struct block_device *hr_bdev; struct o2hb_disk_slot *hr_slots; + /* live node map of this region */ + unsigned long hr_live_node_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)]; + /* let the person setting up hb wait for it to return until it * has reached a 'steady' state. This will be fixed when we have * a more complete api that doesn't lead to this sort of fragility. */ @@ -688,6 +691,8 @@ static int o2hb_check_slot(struct o2hb_region *reg, mlog(ML_HEARTBEAT, "Node %d (id 0x%llx) joined my region\n", slot->ds_node_num, (long long)slot->ds_last_generation); + set_bit(slot->ds_node_num, reg->hr_live_node_bitmap); + /* first on the list generates a callback */ if (list_empty(&o2hb_live_slots[slot->ds_node_num])) { set_bit(slot->ds_node_num, o2hb_live_node_bitmap); @@ -733,6 +738,8 @@ static int o2hb_check_slot(struct o2hb_region *reg, mlog(ML_HEARTBEAT, "Node %d left my region\n", slot->ds_node_num); + clear_bit(slot->ds_node_num, reg->hr_live_node_bitmap); + /* last off the live_slot generates a callback */ list_del_init(&slot->ds_live_item); if (list_empty(&o2hb_live_slots[slot->ds_node_num])) {