aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmmaster.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/dlm/dlmmaster.c')
-rw-r--r--fs/ocfs2/dlm/dlmmaster.c46
1 files changed, 21 insertions, 25 deletions
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c
index 11eefb8c12e9..9f3b093b629a 100644
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -829,8 +829,8 @@ lookup:
829 * but they might own this lockres. wait on them. */ 829 * but they might own this lockres. wait on them. */
830 bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0); 830 bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0);
831 if (bit < O2NM_MAX_NODES) { 831 if (bit < O2NM_MAX_NODES) {
832 mlog(ML_NOTICE, "%s:%.*s: at least one node (%d) to " 832 mlog(0, "%s: res %.*s, At least one node (%d) "
833 "recover before lock mastery can begin\n", 833 "to recover before lock mastery can begin\n",
834 dlm->name, namelen, (char *)lockid, bit); 834 dlm->name, namelen, (char *)lockid, bit);
835 wait_on_recovery = 1; 835 wait_on_recovery = 1;
836 } 836 }
@@ -864,8 +864,8 @@ redo_request:
864 * dlm spinlock would be detectable be a change on the mle, 864 * dlm spinlock would be detectable be a change on the mle,
865 * so we only need to clear out the recovery map once. */ 865 * so we only need to clear out the recovery map once. */
866 if (dlm_is_recovery_lock(lockid, namelen)) { 866 if (dlm_is_recovery_lock(lockid, namelen)) {
867 mlog(ML_NOTICE, "%s: recovery map is not empty, but " 867 mlog(0, "%s: Recovery map is not empty, but must "
868 "must master $RECOVERY lock now\n", dlm->name); 868 "master $RECOVERY lock now\n", dlm->name);
869 if (!dlm_pre_master_reco_lockres(dlm, res)) 869 if (!dlm_pre_master_reco_lockres(dlm, res))
870 wait_on_recovery = 0; 870 wait_on_recovery = 0;
871 else { 871 else {
@@ -883,8 +883,8 @@ redo_request:
883 spin_lock(&dlm->spinlock); 883 spin_lock(&dlm->spinlock);
884 bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0); 884 bit = find_next_bit(dlm->recovery_map, O2NM_MAX_NODES, 0);
885 if (bit < O2NM_MAX_NODES) { 885 if (bit < O2NM_MAX_NODES) {
886 mlog(ML_NOTICE, "%s:%.*s: at least one node (%d) to " 886 mlog(0, "%s: res %.*s, At least one node (%d) "
887 "recover before lock mastery can begin\n", 887 "to recover before lock mastery can begin\n",
888 dlm->name, namelen, (char *)lockid, bit); 888 dlm->name, namelen, (char *)lockid, bit);
889 wait_on_recovery = 1; 889 wait_on_recovery = 1;
890 } else 890 } else
@@ -913,8 +913,8 @@ redo_request:
913 * yet, keep going until it does. this is how the 913 * yet, keep going until it does. this is how the
914 * master will know that asserts are needed back to 914 * master will know that asserts are needed back to
915 * the lower nodes. */ 915 * the lower nodes. */
916 mlog(0, "%s:%.*s: requests only up to %u but master " 916 mlog(0, "%s: res %.*s, Requests only up to %u but "
917 "is %u, keep going\n", dlm->name, namelen, 917 "master is %u, keep going\n", dlm->name, namelen,
918 lockid, nodenum, mle->master); 918 lockid, nodenum, mle->master);
919 } 919 }
920 } 920 }
@@ -924,13 +924,12 @@ wait:
924 ret = dlm_wait_for_lock_mastery(dlm, res, mle, &blocked); 924 ret = dlm_wait_for_lock_mastery(dlm, res, mle, &blocked);
925 if (ret < 0) { 925 if (ret < 0) {
926 wait_on_recovery = 1; 926 wait_on_recovery = 1;
927 mlog(0, "%s:%.*s: node map changed, redo the " 927 mlog(0, "%s: res %.*s, Node map changed, redo the master "
928 "master request now, blocked=%d\n", 928 "request now, blocked=%d\n", dlm->name, res->lockname.len,
929 dlm->name, res->lockname.len,
930 res->lockname.name, blocked); 929 res->lockname.name, blocked);
931 if (++tries > 20) { 930 if (++tries > 20) {
932 mlog(ML_ERROR, "%s:%.*s: spinning on " 931 mlog(ML_ERROR, "%s: res %.*s, Spinning on "
933 "dlm_wait_for_lock_mastery, blocked=%d\n", 932 "dlm_wait_for_lock_mastery, blocked = %d\n",
934 dlm->name, res->lockname.len, 933 dlm->name, res->lockname.len,
935 res->lockname.name, blocked); 934 res->lockname.name, blocked);
936 dlm_print_one_lock_resource(res); 935 dlm_print_one_lock_resource(res);
@@ -940,7 +939,8 @@ wait:
940 goto redo_request; 939 goto redo_request;
941 } 940 }
942 941
943 mlog(0, "lockres mastered by %u\n", res->owner); 942 mlog(0, "%s: res %.*s, Mastered by %u\n", dlm->name, res->lockname.len,
943 res->lockname.name, res->owner);
944 /* make sure we never continue without this */ 944 /* make sure we never continue without this */
945 BUG_ON(res->owner == O2NM_MAX_NODES); 945 BUG_ON(res->owner == O2NM_MAX_NODES);
946 946
@@ -2187,8 +2187,6 @@ int dlm_drop_lockres_ref(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
2187 namelen = res->lockname.len; 2187 namelen = res->lockname.len;
2188 BUG_ON(namelen > O2NM_MAX_NAME_LEN); 2188 BUG_ON(namelen > O2NM_MAX_NAME_LEN);
2189 2189
2190 mlog(0, "%s:%.*s: sending deref to %d\n",
2191 dlm->name, namelen, lockname, res->owner);
2192 memset(&deref, 0, sizeof(deref)); 2190 memset(&deref, 0, sizeof(deref));
2193 deref.node_idx = dlm->node_num; 2191 deref.node_idx = dlm->node_num;
2194 deref.namelen = namelen; 2192 deref.namelen = namelen;
@@ -2197,14 +2195,12 @@ int dlm_drop_lockres_ref(struct dlm_ctxt *dlm, struct dlm_lock_resource *res)
2197 ret = o2net_send_message(DLM_DEREF_LOCKRES_MSG, dlm->key, 2195 ret = o2net_send_message(DLM_DEREF_LOCKRES_MSG, dlm->key,
2198 &deref, sizeof(deref), res->owner, &r); 2196 &deref, sizeof(deref), res->owner, &r);
2199 if (ret < 0) 2197 if (ret < 0)
2200 mlog(ML_ERROR, "Error %d when sending message %u (key 0x%x) to " 2198 mlog(ML_ERROR, "%s: res %.*s, error %d send DEREF to node %u\n",
2201 "node %u\n", ret, DLM_DEREF_LOCKRES_MSG, dlm->key, 2199 dlm->name, namelen, lockname, ret, res->owner);
2202 res->owner);
2203 else if (r < 0) { 2200 else if (r < 0) {
2204 /* BAD. other node says I did not have a ref. */ 2201 /* BAD. other node says I did not have a ref. */
2205 mlog(ML_ERROR,"while dropping ref on %s:%.*s " 2202 mlog(ML_ERROR, "%s: res %.*s, DEREF to node %u got %d\n",
2206 "(master=%u) got %d.\n", dlm->name, namelen, 2203 dlm->name, namelen, lockname, res->owner, r);
2207 lockname, res->owner, r);
2208 dlm_print_one_lock_resource(res); 2204 dlm_print_one_lock_resource(res);
2209 BUG(); 2205 BUG();
2210 } 2206 }
@@ -2916,9 +2912,9 @@ static int dlm_do_migrate_request(struct dlm_ctxt *dlm,
2916 &migrate, sizeof(migrate), nodenum, 2912 &migrate, sizeof(migrate), nodenum,
2917 &status); 2913 &status);
2918 if (ret < 0) { 2914 if (ret < 0) {
2919 mlog(ML_ERROR, "Error %d when sending message %u (key " 2915 mlog(ML_ERROR, "%s: res %.*s, Error %d send "
2920 "0x%x) to node %u\n", ret, DLM_MIGRATE_REQUEST_MSG, 2916 "MIGRATE_REQUEST to node %u\n", dlm->name,
2921 dlm->key, nodenum); 2917 migrate.namelen, migrate.name, ret, nodenum);
2922 if (!dlm_is_host_down(ret)) { 2918 if (!dlm_is_host_down(ret)) {
2923 mlog(ML_ERROR, "unhandled error=%d!\n", ret); 2919 mlog(ML_ERROR, "unhandled error=%d!\n", ret);
2924 BUG(); 2920 BUG();