diff options
Diffstat (limited to 'fs/ocfs2/dlm/dlmlock.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmlock.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c index d1a0038557a3..671d4ff222cc 100644 --- a/fs/ocfs2/dlm/dlmlock.c +++ b/fs/ocfs2/dlm/dlmlock.c | |||
@@ -220,6 +220,17 @@ static enum dlm_status dlmlock_remote(struct dlm_ctxt *dlm, | |||
220 | dlm_error(status); | 220 | dlm_error(status); |
221 | dlm_revert_pending_lock(res, lock); | 221 | dlm_revert_pending_lock(res, lock); |
222 | dlm_lock_put(lock); | 222 | dlm_lock_put(lock); |
223 | } else if (dlm_is_recovery_lock(res->lockname.name, | ||
224 | res->lockname.len)) { | ||
225 | /* special case for the $RECOVERY lock. | ||
226 | * there will never be an AST delivered to put | ||
227 | * this lock on the proper secondary queue | ||
228 | * (granted), so do it manually. */ | ||
229 | mlog(0, "%s: $RECOVERY lock for this node (%u) is " | ||
230 | "mastered by %u; got lock, manually granting (no ast)\n", | ||
231 | dlm->name, dlm->node_num, res->owner); | ||
232 | list_del_init(&lock->list); | ||
233 | list_add_tail(&lock->list, &res->granted); | ||
223 | } | 234 | } |
224 | spin_unlock(&res->spinlock); | 235 | spin_unlock(&res->spinlock); |
225 | 236 | ||
@@ -646,7 +657,19 @@ retry_lock: | |||
646 | mlog(0, "retrying lock with migration/" | 657 | mlog(0, "retrying lock with migration/" |
647 | "recovery/in progress\n"); | 658 | "recovery/in progress\n"); |
648 | msleep(100); | 659 | msleep(100); |
649 | dlm_wait_for_recovery(dlm); | 660 | /* no waiting for dlm_reco_thread */ |
661 | if (recovery) { | ||
662 | if (status == DLM_RECOVERING) { | ||
663 | mlog(0, "%s: got RECOVERING " | ||
664 | "for $REOCVERY lock, master " | ||
665 | "was %u\n", dlm->name, | ||
666 | res->owner); | ||
667 | dlm_wait_for_node_death(dlm, res->owner, | ||
668 | DLM_NODE_DEATH_WAIT_MAX); | ||
669 | } | ||
670 | } else { | ||
671 | dlm_wait_for_recovery(dlm); | ||
672 | } | ||
650 | goto retry_lock; | 673 | goto retry_lock; |
651 | } | 674 | } |
652 | 675 | ||