Loading fs/ocfs2/dlm/dlmmaster.c +14 −4 Original line number Original line Diff line number Diff line Loading @@ -1633,6 +1633,8 @@ static int dlm_do_assert_master(struct dlm_ctxt *dlm, const char *lockname, dlm_node_iter_init(nodemap, &iter); dlm_node_iter_init(nodemap, &iter); while ((to = dlm_node_iter_next(&iter)) >= 0) { while ((to = dlm_node_iter_next(&iter)) >= 0) { int r = 0; int r = 0; struct dlm_master_list_entry *mle = NULL; mlog(0, "sending assert master to %d (%.*s)\n", to, mlog(0, "sending assert master to %d (%.*s)\n", to, namelen, lockname); namelen, lockname); memset(&assert, 0, sizeof(assert)); memset(&assert, 0, sizeof(assert)); Loading @@ -1657,7 +1659,15 @@ static int dlm_do_assert_master(struct dlm_ctxt *dlm, const char *lockname, /* ok, something horribly messed. kill thyself. */ /* ok, something horribly messed. kill thyself. */ mlog(ML_ERROR,"during assert master of %.*s to %u, " mlog(ML_ERROR,"during assert master of %.*s to %u, " "got %d.\n", namelen, lockname, to, r); "got %d.\n", namelen, lockname, to, r); dlm_dump_lock_resources(dlm); spin_lock(&dlm->spinlock); spin_lock(&dlm->master_lock); if (dlm_find_mle(dlm, &mle, (char *)lockname, namelen)) { dlm_print_one_mle(mle); __dlm_put_mle(mle); } spin_unlock(&dlm->master_lock); spin_unlock(&dlm->spinlock); BUG(); BUG(); } else if (r == EAGAIN) { } else if (r == EAGAIN) { mlog(0, "%.*s: node %u create mles on other " mlog(0, "%.*s: node %u create mles on other " Loading Loading @@ -1922,12 +1932,12 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data) kill: kill: /* kill the caller! */ /* kill the caller! */ mlog(ML_ERROR, "Bad message received from another node. Dumping state " "and killing the other node now! This node is OK and can continue.\n"); __dlm_print_one_lock_resource(res); spin_unlock(&res->spinlock); spin_unlock(&res->spinlock); spin_unlock(&dlm->spinlock); spin_unlock(&dlm->spinlock); dlm_lockres_put(res); dlm_lockres_put(res); mlog(ML_ERROR, "Bad message received from another node. Dumping state " "and killing the other node now! This node is OK and can continue.\n"); dlm_dump_lock_resources(dlm); dlm_put(dlm); dlm_put(dlm); return -EINVAL; return -EINVAL; } } Loading Loading
fs/ocfs2/dlm/dlmmaster.c +14 −4 Original line number Original line Diff line number Diff line Loading @@ -1633,6 +1633,8 @@ static int dlm_do_assert_master(struct dlm_ctxt *dlm, const char *lockname, dlm_node_iter_init(nodemap, &iter); dlm_node_iter_init(nodemap, &iter); while ((to = dlm_node_iter_next(&iter)) >= 0) { while ((to = dlm_node_iter_next(&iter)) >= 0) { int r = 0; int r = 0; struct dlm_master_list_entry *mle = NULL; mlog(0, "sending assert master to %d (%.*s)\n", to, mlog(0, "sending assert master to %d (%.*s)\n", to, namelen, lockname); namelen, lockname); memset(&assert, 0, sizeof(assert)); memset(&assert, 0, sizeof(assert)); Loading @@ -1657,7 +1659,15 @@ static int dlm_do_assert_master(struct dlm_ctxt *dlm, const char *lockname, /* ok, something horribly messed. kill thyself. */ /* ok, something horribly messed. kill thyself. */ mlog(ML_ERROR,"during assert master of %.*s to %u, " mlog(ML_ERROR,"during assert master of %.*s to %u, " "got %d.\n", namelen, lockname, to, r); "got %d.\n", namelen, lockname, to, r); dlm_dump_lock_resources(dlm); spin_lock(&dlm->spinlock); spin_lock(&dlm->master_lock); if (dlm_find_mle(dlm, &mle, (char *)lockname, namelen)) { dlm_print_one_mle(mle); __dlm_put_mle(mle); } spin_unlock(&dlm->master_lock); spin_unlock(&dlm->spinlock); BUG(); BUG(); } else if (r == EAGAIN) { } else if (r == EAGAIN) { mlog(0, "%.*s: node %u create mles on other " mlog(0, "%.*s: node %u create mles on other " Loading Loading @@ -1922,12 +1932,12 @@ int dlm_assert_master_handler(struct o2net_msg *msg, u32 len, void *data) kill: kill: /* kill the caller! */ /* kill the caller! */ mlog(ML_ERROR, "Bad message received from another node. Dumping state " "and killing the other node now! This node is OK and can continue.\n"); __dlm_print_one_lock_resource(res); spin_unlock(&res->spinlock); spin_unlock(&res->spinlock); spin_unlock(&dlm->spinlock); spin_unlock(&dlm->spinlock); dlm_lockres_put(res); dlm_lockres_put(res); mlog(ML_ERROR, "Bad message received from another node. Dumping state " "and killing the other node now! This node is OK and can continue.\n"); dlm_dump_lock_resources(dlm); dlm_put(dlm); dlm_put(dlm); return -EINVAL; return -EINVAL; } } Loading