Skip to contentSkip to conversation

ocfs2/dlm: clear DROPPING_REF flag when the master goes down

PATCH New xuejiufei 2 participants 2 messages Jan 26, 2016 – Jan 27, 2016 OCFS2

lore
Share & tools
lore

xuejiufei

author
#0 lore raw

PATCH 3/4 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.

---
 fs/ocfs2/dlm/dlmrecovery.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
fs/ocfs2/dlm/dlmrecovery.c +10 -8
index c5bdf02..c19059a 100644
@@ -2375,14 +2375,16 @@ static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node)
 			dlm_revalidate_lvb(dlm, res, dead_node);
 			if (res->owner == dead_node) {
 				if (res->state & DLM_LOCK_RES_DROPPING_REF) {
-					mlog(ML_NOTICE, "%s: res %.*s, Skip "
-					     "recovery as it is being freed\n",
-					     dlm->name, res->lockname.len,
-					     res->lockname.name);
-				} else
-					dlm_move_lockres_to_recovery_list(dlm,
-									  res);
-
+					mlog(0, "%s:%.*s: owned by "
+						"dead node %u, this node was "
+						"dropping its ref when it died. "
+						"continue, dropping the flag.\n",
+						dlm->name, res->lockname.len,
+						res->lockname.name, dead_node);
+				}
+				res->state &= ~DLM_LOCK_RES_DROPPING_REF;
+				dlm_move_lockres_to_recovery_list(dlm,
+						res);
 			} else if (res->owner == dlm->node_num) {
 				dlm_free_dead_locks(dlm, res, dead_node);
 				__dlm_lockres_calc_usage(dlm, res);
Signature · 1 line
1.8.4.3
#1 lore raw

PATCH 3/4 ocfs2/dlm: clear DROPPING_REF flag when the master goes down

Quoted 5 lines · xuejiufei

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.

Quoted 34 lines
---
 fs/ocfs2/dlm/dlmrecovery.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
fs/ocfs2/dlm/dlmrecovery.c +10 -8
index c5bdf02..c19059a 100644
@@ -2375,14 +2375,16 @@ static void dlm_do_local_recovery_cleanup(struct dlm_ctxt *dlm, u8 dead_node)
 			dlm_revalidate_lvb(dlm, res, dead_node);
 			if (res->owner == dead_node) {
 				if (res->state & DLM_LOCK_RES_DROPPING_REF) {
-					mlog(ML_NOTICE, "%s: res %.*s, Skip "
-					     "recovery as it is being freed\n",
-					     dlm->name, res->lockname.len,
-					     res->lockname.name);
-				} else
-					dlm_move_lockres_to_recovery_list(dlm,
-									  res);
-
+					mlog(0, "%s:%.*s: owned by "
+						"dead node %u, this node was "
+						"dropping its ref when it died. "
+						"continue, dropping the flag.\n",
+						dlm->name, res->lockname.len,
+						res->lockname.name, dead_node);
+				}
+				res->state &= ~DLM_LOCK_RES_DROPPING_REF;
+				dlm_move_lockres_to_recovery_list(dlm,
+						res);
 			} else if (res->owner == dlm->node_num) {
 				dlm_free_dead_locks(dlm, res, dead_node);
 				__dlm_lockres_calc_usage(dlm, res);