diff options
Diffstat (limited to 'fs/ocfs2/cluster/heartbeat.c')
-rw-r--r-- | fs/ocfs2/cluster/heartbeat.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 42252bf64b51..5c1c864e81cc 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
@@ -176,7 +176,7 @@ static void o2hb_dead_threshold_set(unsigned int threshold) | |||
176 | } | 176 | } |
177 | } | 177 | } |
178 | 178 | ||
179 | static int o2hb_global_hearbeat_mode_set(unsigned int hb_mode) | 179 | static int o2hb_global_heartbeat_mode_set(unsigned int hb_mode) |
180 | { | 180 | { |
181 | int ret = -1; | 181 | int ret = -1; |
182 | 182 | ||
@@ -500,7 +500,7 @@ static int o2hb_issue_node_write(struct o2hb_region *reg, | |||
500 | } | 500 | } |
501 | 501 | ||
502 | atomic_inc(&write_wc->wc_num_reqs); | 502 | atomic_inc(&write_wc->wc_num_reqs); |
503 | submit_bio(WRITE, bio); | 503 | submit_bio(WRITE_SYNC, bio); |
504 | 504 | ||
505 | status = 0; | 505 | status = 0; |
506 | bail: | 506 | bail: |
@@ -2271,7 +2271,7 @@ ssize_t o2hb_heartbeat_group_mode_store(struct o2hb_heartbeat_group *group, | |||
2271 | if (strnicmp(page, o2hb_heartbeat_mode_desc[i], len)) | 2271 | if (strnicmp(page, o2hb_heartbeat_mode_desc[i], len)) |
2272 | continue; | 2272 | continue; |
2273 | 2273 | ||
2274 | ret = o2hb_global_hearbeat_mode_set(i); | 2274 | ret = o2hb_global_heartbeat_mode_set(i); |
2275 | if (!ret) | 2275 | if (!ret) |
2276 | printk(KERN_NOTICE "o2hb: Heartbeat mode set to %s\n", | 2276 | printk(KERN_NOTICE "o2hb: Heartbeat mode set to %s\n", |
2277 | o2hb_heartbeat_mode_desc[i]); | 2277 | o2hb_heartbeat_mode_desc[i]); |
@@ -2304,7 +2304,7 @@ static struct configfs_attribute *o2hb_heartbeat_group_attrs[] = { | |||
2304 | NULL, | 2304 | NULL, |
2305 | }; | 2305 | }; |
2306 | 2306 | ||
2307 | static struct configfs_item_operations o2hb_hearbeat_group_item_ops = { | 2307 | static struct configfs_item_operations o2hb_heartbeat_group_item_ops = { |
2308 | .show_attribute = o2hb_heartbeat_group_show, | 2308 | .show_attribute = o2hb_heartbeat_group_show, |
2309 | .store_attribute = o2hb_heartbeat_group_store, | 2309 | .store_attribute = o2hb_heartbeat_group_store, |
2310 | }; | 2310 | }; |
@@ -2316,7 +2316,7 @@ static struct configfs_group_operations o2hb_heartbeat_group_group_ops = { | |||
2316 | 2316 | ||
2317 | static struct config_item_type o2hb_heartbeat_group_type = { | 2317 | static struct config_item_type o2hb_heartbeat_group_type = { |
2318 | .ct_group_ops = &o2hb_heartbeat_group_group_ops, | 2318 | .ct_group_ops = &o2hb_heartbeat_group_group_ops, |
2319 | .ct_item_ops = &o2hb_hearbeat_group_item_ops, | 2319 | .ct_item_ops = &o2hb_heartbeat_group_item_ops, |
2320 | .ct_attrs = o2hb_heartbeat_group_attrs, | 2320 | .ct_attrs = o2hb_heartbeat_group_attrs, |
2321 | .ct_owner = THIS_MODULE, | 2321 | .ct_owner = THIS_MODULE, |
2322 | }; | 2322 | }; |
@@ -2389,6 +2389,9 @@ static int o2hb_region_pin(const char *region_uuid) | |||
2389 | assert_spin_locked(&o2hb_live_lock); | 2389 | assert_spin_locked(&o2hb_live_lock); |
2390 | 2390 | ||
2391 | list_for_each_entry(reg, &o2hb_all_regions, hr_all_item) { | 2391 | list_for_each_entry(reg, &o2hb_all_regions, hr_all_item) { |
2392 | if (reg->hr_item_dropped) | ||
2393 | continue; | ||
2394 | |||
2392 | uuid = config_item_name(®->hr_item); | 2395 | uuid = config_item_name(®->hr_item); |
2393 | 2396 | ||
2394 | /* local heartbeat */ | 2397 | /* local heartbeat */ |
@@ -2439,6 +2442,9 @@ static void o2hb_region_unpin(const char *region_uuid) | |||
2439 | assert_spin_locked(&o2hb_live_lock); | 2442 | assert_spin_locked(&o2hb_live_lock); |
2440 | 2443 | ||
2441 | list_for_each_entry(reg, &o2hb_all_regions, hr_all_item) { | 2444 | list_for_each_entry(reg, &o2hb_all_regions, hr_all_item) { |
2445 | if (reg->hr_item_dropped) | ||
2446 | continue; | ||
2447 | |||
2442 | uuid = config_item_name(®->hr_item); | 2448 | uuid = config_item_name(®->hr_item); |
2443 | if (region_uuid) { | 2449 | if (region_uuid) { |
2444 | if (strcmp(region_uuid, uuid)) | 2450 | if (strcmp(region_uuid, uuid)) |
@@ -2654,6 +2660,9 @@ int o2hb_get_all_regions(char *region_uuids, u8 max_regions) | |||
2654 | 2660 | ||
2655 | p = region_uuids; | 2661 | p = region_uuids; |
2656 | list_for_each_entry(reg, &o2hb_all_regions, hr_all_item) { | 2662 | list_for_each_entry(reg, &o2hb_all_regions, hr_all_item) { |
2663 | if (reg->hr_item_dropped) | ||
2664 | continue; | ||
2665 | |||
2657 | mlog(0, "Region: %s\n", config_item_name(®->hr_item)); | 2666 | mlog(0, "Region: %s\n", config_item_name(®->hr_item)); |
2658 | if (numregs < max_regions) { | 2667 | if (numregs < max_regions) { |
2659 | memcpy(p, config_item_name(®->hr_item), | 2668 | memcpy(p, config_item_name(®->hr_item), |