diff options
Diffstat (limited to 'fs/ocfs2/dlm/dlmrecovery.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmrecovery.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 186e9a76aa58..f9ce864966ec 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c | |||
@@ -2032,6 +2032,30 @@ again: | |||
2032 | dlm->reco.new_master); | 2032 | dlm->reco.new_master); |
2033 | status = -EEXIST; | 2033 | status = -EEXIST; |
2034 | } else { | 2034 | } else { |
2035 | status = 0; | ||
2036 | |||
2037 | /* see if recovery was already finished elsewhere */ | ||
2038 | spin_lock(&dlm->spinlock); | ||
2039 | if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { | ||
2040 | status = -EINVAL; | ||
2041 | mlog(0, "%s: got reco EX lock, but " | ||
2042 | "node got recovered already\n", dlm->name); | ||
2043 | if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) { | ||
2044 | mlog(ML_ERROR, "%s: new master is %u " | ||
2045 | "but no dead node!\n", | ||
2046 | dlm->name, dlm->reco.new_master); | ||
2047 | BUG(); | ||
2048 | } | ||
2049 | } | ||
2050 | spin_unlock(&dlm->spinlock); | ||
2051 | } | ||
2052 | |||
2053 | /* if this node has actually become the recovery master, | ||
2054 | * set the master and send the messages to begin recovery */ | ||
2055 | if (!status) { | ||
2056 | mlog(0, "%s: dead=%u, this=%u, sending " | ||
2057 | "begin_reco now\n", dlm->name, | ||
2058 | dlm->reco.dead_node, dlm->node_num); | ||
2035 | status = dlm_send_begin_reco_message(dlm, | 2059 | status = dlm_send_begin_reco_message(dlm, |
2036 | dlm->reco.dead_node); | 2060 | dlm->reco.dead_node); |
2037 | /* this always succeeds */ | 2061 | /* this always succeeds */ |