Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212791
b: refs/heads/master
c: 823a637
h: refs/heads/master
i:
  212789: b6a8968
  212787: b496b97
  212783: 4360815
v: v3
  • Loading branch information
Sunil Mushran committed Oct 7, 2010
1 parent 074199d commit a721579
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ca8b0bbd841b6bcd8ac05e51b0143aa61cfeff3
refs/heads/master: 823a637ae933fde8fdb280612dd3ff9912e301e3
7 changes: 7 additions & 0 deletions trunk/fs/ocfs2/cluster/heartbeat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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])) {
Expand Down

0 comments on commit a721579

Please sign in to comment.