diff options
Diffstat (limited to 'fs/ocfs2/dlm/dlmmaster.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index 03ccf9a7b1f4..a659606dcb95 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -366,7 +366,7 @@ void dlm_hb_event_notify_attached(struct dlm_ctxt *dlm, int idx, int node_up) | |||
366 | struct dlm_master_list_entry *mle; | 366 | struct dlm_master_list_entry *mle; |
367 | 367 | ||
368 | assert_spin_locked(&dlm->spinlock); | 368 | assert_spin_locked(&dlm->spinlock); |
369 | 369 | ||
370 | list_for_each_entry(mle, &dlm->mle_hb_events, hb_events) { | 370 | list_for_each_entry(mle, &dlm->mle_hb_events, hb_events) { |
371 | if (node_up) | 371 | if (node_up) |
372 | dlm_mle_node_up(dlm, mle, NULL, idx); | 372 | dlm_mle_node_up(dlm, mle, NULL, idx); |
@@ -833,7 +833,7 @@ lookup: | |||
833 | __dlm_insert_mle(dlm, mle); | 833 | __dlm_insert_mle(dlm, mle); |
834 | 834 | ||
835 | /* still holding the dlm spinlock, check the recovery map | 835 | /* still holding the dlm spinlock, check the recovery map |
836 | * to see if there are any nodes that still need to be | 836 | * to see if there are any nodes that still need to be |
837 | * considered. these will not appear in the mle nodemap | 837 | * considered. these will not appear in the mle nodemap |
838 | * but they might own this lockres. wait on them. */ | 838 | * but they might own this lockres. wait on them. */ |
839 | bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0); | 839 | bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0); |
@@ -883,7 +883,7 @@ redo_request: | |||
883 | msleep(500); | 883 | msleep(500); |
884 | } | 884 | } |
885 | continue; | 885 | continue; |
886 | } | 886 | } |
887 | 887 | ||
888 | dlm_kick_recovery_thread(dlm); | 888 | dlm_kick_recovery_thread(dlm); |
889 | msleep(1000); | 889 | msleep(1000); |
@@ -939,8 +939,8 @@ wait: | |||
939 | res->lockname.name, blocked); | 939 | res->lockname.name, blocked); |
940 | if (++tries > 20) { | 940 | if (++tries > 20) { |
941 | mlog(ML_ERROR, "%s:%.*s: spinning on " | 941 | mlog(ML_ERROR, "%s:%.*s: spinning on " |
942 | "dlm_wait_for_lock_mastery, blocked=%d\n", | 942 | "dlm_wait_for_lock_mastery, blocked=%d\n", |
943 | dlm->name, res->lockname.len, | 943 | dlm->name, res->lockname.len, |
944 | res->lockname.name, blocked); | 944 | res->lockname.name, blocked); |
945 | dlm_print_one_lock_resource(res); | 945 | dlm_print_one_lock_resource(res); |
946 | dlm_print_one_mle(mle); | 946 | dlm_print_one_mle(mle); |
@@ -1029,7 +1029,7 @@ recheck: | |||
1029 | ret = dlm_restart_lock_mastery(dlm, res, mle, *blocked); | 1029 | ret = dlm_restart_lock_mastery(dlm, res, mle, *blocked); |
1030 | b = (mle->type == DLM_MLE_BLOCK); | 1030 | b = (mle->type == DLM_MLE_BLOCK); |
1031 | if ((*blocked && !b) || (!*blocked && b)) { | 1031 | if ((*blocked && !b) || (!*blocked && b)) { |
1032 | mlog(0, "%s:%.*s: status change: old=%d new=%d\n", | 1032 | mlog(0, "%s:%.*s: status change: old=%d new=%d\n", |
1033 | dlm->name, res->lockname.len, res->lockname.name, | 1033 | dlm->name, res->lockname.len, res->lockname.name, |
1034 | *blocked, b); | 1034 | *blocked, b); |
1035 | *blocked = b; | 1035 | *blocked = b; |
@@ -1602,7 +1602,7 @@ send_response: | |||
1602 | } | 1602 | } |
1603 | mlog(0, "%u is the owner of %.*s, cleaning everyone else\n", | 1603 | mlog(0, "%u is the owner of %.*s, cleaning everyone else\n", |
1604 | dlm->node_num, res->lockname.len, res->lockname.name); | 1604 | dlm->node_num, res->lockname.len, res->lockname.name); |
1605 | ret = dlm_dispatch_assert_master(dlm, res, 0, request->node_idx, | 1605 | ret = dlm_dispatch_assert_master(dlm, res, 0, request->node_idx, |
1606 | DLM_ASSERT_MASTER_MLE_CLEANUP); | 1606 | DLM_ASSERT_MASTER_MLE_CLEANUP); |
1607 | if (ret < 0) { | 1607 | if (ret < 0) { |
1608 | mlog(ML_ERROR, "failed to dispatch assert master work\n"); | 1608 | mlog(ML_ERROR, "failed to dispatch assert master work\n"); |
@@ -1701,7 +1701,7 @@ again: | |||
1701 | 1701 | ||
1702 | if (r & DLM_ASSERT_RESPONSE_REASSERT) { | 1702 | if (r & DLM_ASSERT_RESPONSE_REASSERT) { |
1703 | mlog(0, "%.*s: node %u create mles on other " | 1703 | mlog(0, "%.*s: node %u create mles on other " |
1704 | "nodes and requests a re-assert\n", | 1704 | "nodes and requests a re-assert\n", |
1705 | namelen, lockname, to); | 1705 | namelen, lockname, to); |
1706 | reassert = 1; | 1706 | reassert = 1; |
1707 | } | 1707 | } |
@@ -1812,7 +1812,7 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data, | |||
1812 | spin_unlock(&dlm->master_lock); | 1812 | spin_unlock(&dlm->master_lock); |
1813 | spin_unlock(&dlm->spinlock); | 1813 | spin_unlock(&dlm->spinlock); |
1814 | goto done; | 1814 | goto done; |
1815 | } | 1815 | } |
1816 | } | 1816 | } |
1817 | } | 1817 | } |
1818 | spin_unlock(&dlm->master_lock); | 1818 | spin_unlock(&dlm->master_lock); |
@@ -1883,7 +1883,7 @@ ok: | |||
1883 | int extra_ref = 0; | 1883 | int extra_ref = 0; |
1884 | int nn = -1; | 1884 | int nn = -1; |
1885 | int rr, err = 0; | 1885 | int rr, err = 0; |
1886 | 1886 | ||
1887 | spin_lock(&mle->spinlock); | 1887 | spin_lock(&mle->spinlock); |
1888 | if (mle->type == DLM_MLE_BLOCK || mle->type == DLM_MLE_MIGRATION) | 1888 | if (mle->type == DLM_MLE_BLOCK || mle->type == DLM_MLE_MIGRATION) |
1889 | extra_ref = 1; | 1889 | extra_ref = 1; |
@@ -1891,7 +1891,7 @@ ok: | |||
1891 | /* MASTER mle: if any bits set in the response map | 1891 | /* MASTER mle: if any bits set in the response map |
1892 | * then the calling node needs to re-assert to clear | 1892 | * then the calling node needs to re-assert to clear |
1893 | * up nodes that this node contacted */ | 1893 | * up nodes that this node contacted */ |
1894 | while ((nn = find_next_bit (mle->response_map, O2NM_MAX_NODES, | 1894 | while ((nn = find_next_bit (mle->response_map, O2NM_MAX_NODES, |
1895 | nn+1)) < O2NM_MAX_NODES) { | 1895 | nn+1)) < O2NM_MAX_NODES) { |
1896 | if (nn != dlm->node_num && nn != assert->node_idx) | 1896 | if (nn != dlm->node_num && nn != assert->node_idx) |
1897 | master_request = 1; | 1897 | master_request = 1; |
@@ -2002,7 +2002,7 @@ kill: | |||
2002 | __dlm_print_one_lock_resource(res); | 2002 | __dlm_print_one_lock_resource(res); |
2003 | spin_unlock(&res->spinlock); | 2003 | spin_unlock(&res->spinlock); |
2004 | spin_unlock(&dlm->spinlock); | 2004 | spin_unlock(&dlm->spinlock); |
2005 | *ret_data = (void *)res; | 2005 | *ret_data = (void *)res; |
2006 | dlm_put(dlm); | 2006 | dlm_put(dlm); |
2007 | return -EINVAL; | 2007 | return -EINVAL; |
2008 | } | 2008 | } |
@@ -2040,10 +2040,10 @@ int dlm_dispatch_assert_master(struct dlm_ctxt *dlm, | |||
2040 | item->u.am.request_from = request_from; | 2040 | item->u.am.request_from = request_from; |
2041 | item->u.am.flags = flags; | 2041 | item->u.am.flags = flags; |
2042 | 2042 | ||
2043 | if (ignore_higher) | 2043 | if (ignore_higher) |
2044 | mlog(0, "IGNORE HIGHER: %.*s\n", res->lockname.len, | 2044 | mlog(0, "IGNORE HIGHER: %.*s\n", res->lockname.len, |
2045 | res->lockname.name); | 2045 | res->lockname.name); |
2046 | 2046 | ||
2047 | spin_lock(&dlm->work_lock); | 2047 | spin_lock(&dlm->work_lock); |
2048 | list_add_tail(&item->list, &dlm->work_list); | 2048 | list_add_tail(&item->list, &dlm->work_list); |
2049 | spin_unlock(&dlm->work_lock); | 2049 | spin_unlock(&dlm->work_lock); |
@@ -2133,7 +2133,7 @@ put: | |||
2133 | * think that $RECOVERY is currently mastered by a dead node. If so, | 2133 | * think that $RECOVERY is currently mastered by a dead node. If so, |
2134 | * we wait a short time to allow that node to get notified by its own | 2134 | * we wait a short time to allow that node to get notified by its own |
2135 | * heartbeat stack, then check again. All $RECOVERY lock resources | 2135 | * heartbeat stack, then check again. All $RECOVERY lock resources |
2136 | * mastered by dead nodes are purged when the hearbeat callback is | 2136 | * mastered by dead nodes are purged when the hearbeat callback is |
2137 | * fired, so we can know for sure that it is safe to continue once | 2137 | * fired, so we can know for sure that it is safe to continue once |
2138 | * the node returns a live node or no node. */ | 2138 | * the node returns a live node or no node. */ |
2139 | static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm, | 2139 | static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm, |
@@ -2174,7 +2174,7 @@ static int dlm_pre_master_reco_lockres(struct dlm_ctxt *dlm, | |||
2174 | ret = -EAGAIN; | 2174 | ret = -EAGAIN; |
2175 | } | 2175 | } |
2176 | spin_unlock(&dlm->spinlock); | 2176 | spin_unlock(&dlm->spinlock); |
2177 | mlog(0, "%s: reco lock master is %u\n", dlm->name, | 2177 | mlog(0, "%s: reco lock master is %u\n", dlm->name, |
2178 | master); | 2178 | master); |
2179 | break; | 2179 | break; |
2180 | } | 2180 | } |
@@ -2602,7 +2602,7 @@ fail: | |||
2602 | 2602 | ||
2603 | mlog(0, "%s:%.*s: timed out during migration\n", | 2603 | mlog(0, "%s:%.*s: timed out during migration\n", |
2604 | dlm->name, res->lockname.len, res->lockname.name); | 2604 | dlm->name, res->lockname.len, res->lockname.name); |
2605 | /* avoid hang during shutdown when migrating lockres | 2605 | /* avoid hang during shutdown when migrating lockres |
2606 | * to a node which also goes down */ | 2606 | * to a node which also goes down */ |
2607 | if (dlm_is_node_dead(dlm, target)) { | 2607 | if (dlm_is_node_dead(dlm, target)) { |
2608 | mlog(0, "%s:%.*s: expected migration " | 2608 | mlog(0, "%s:%.*s: expected migration " |
@@ -2738,7 +2738,7 @@ static int dlm_migration_can_proceed(struct dlm_ctxt *dlm, | |||
2738 | can_proceed = !!(res->state & DLM_LOCK_RES_MIGRATING); | 2738 | can_proceed = !!(res->state & DLM_LOCK_RES_MIGRATING); |
2739 | spin_unlock(&res->spinlock); | 2739 | spin_unlock(&res->spinlock); |
2740 | 2740 | ||
2741 | /* target has died, so make the caller break out of the | 2741 | /* target has died, so make the caller break out of the |
2742 | * wait_event, but caller must recheck the domain_map */ | 2742 | * wait_event, but caller must recheck the domain_map */ |
2743 | spin_lock(&dlm->spinlock); | 2743 | spin_lock(&dlm->spinlock); |
2744 | if (!test_bit(mig_target, dlm->domain_map)) | 2744 | if (!test_bit(mig_target, dlm->domain_map)) |