aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dlm/dlmrecovery.c
diff options
context:
space:
mode:
authorxuejiufei <xuejiufei@huawei.com>2016-03-15 17:53:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-03-15 19:55:16 -0400
commit8c0343968163dc3536e56268026f475b1bbf61b4 (patch)
tree90374789123d7d39a80fadb69463c4cd095ea341 /fs/ocfs2/dlm/dlmrecovery.c
parent842b90b62461d0848bd56ad776117d15a5fa95c0 (diff)
ocfs2/dlm: clear DROPPING_REF flag when the master goes down
If the master goes down after return in-progress for deref message. The lock resource on non-master node can not be purged. Clear the DROPPING_REF flag and recovery it. Signed-off-by: xuejiufei <xuejiufei@huawei.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2/dlm/dlmrecovery.c')
-rw-r--r--fs/ocfs2/dlm/dlmrecovery.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c
index b94a425f0175..1eee96e25565 100644
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -2377,14 +2377,16 @@ static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node)
2377 dlm_revalidate_lvb(dlm, res, dead_node); 2377 dlm_revalidate_lvb(dlm, res, dead_node);
2378 if (res->owner == dead_node) { 2378 if (res->owner == dead_node) {
2379 if (res->state & DLM_LOCK_RES_DROPPING_REF) { 2379 if (res->state & DLM_LOCK_RES_DROPPING_REF) {
2380 mlog(ML_NOTICE, "%s: res %.*s, Skip " 2380 mlog(0, "%s:%.*s: owned by "
2381 "recovery as it is being freed\n", 2381 "dead node %u, this node was "
2382 dlm->name, res->lockname.len, 2382 "dropping its ref when it died. "
2383 res->lockname.name); 2383 "continue, dropping the flag.\n",
2384 } else 2384 dlm->name, res->lockname.len,
2385 dlm_move_lockres_to_recovery_list(dlm, 2385 res->lockname.name, dead_node);
2386 res); 2386 }
2387 2387 res->state &= ~DLM_LOCK_RES_DROPPING_REF;
2388 dlm_move_lockres_to_recovery_list(dlm,
2389 res);
2388 } else if (res->owner == dlm->node_num) { 2390 } else if (res->owner == dlm->node_num) {
2389 dlm_free_dead_locks(dlm, res, dead_node); 2391 dlm_free_dead_locks(dlm, res, dead_node);
2390 __dlm_lockres_calc_usage(dlm, res); 2392 __dlm_lockres_calc_usage(dlm, res);