Skip to contentSkip to conversation

fs: dlm: fix possible stuck in shutdown

PATCH New Alexander Aring 1 participant 1 message Aug 26, 2021 Distributed lock manager (DLM)

lore
Share & tools
lore

Alexander Aring

author maintainer
#0 lore raw

PATCH 1/1 fs: dlm: fix possible stuck in shutdown

In case of releasing the last lockspace we make a clean shutdown to synchronize cluster manager membership with the dlm kernel protocol. In some cases when a passive shutdown (membership removal during lockspace operational) is interrupted by a active shutdown (releasing last lockspace) this synchronize can stuck because the active shutdown waits until passive shutdown is done. In case of passive shutdown we wait for the membership remove event. If active shutdown interrupts passive shutdown and such event didn't happened before the shutdown gets stuck because dlm recovery (which handles cluster manager membership events) is already stopped. To avoid it we trigger the event before calling the active shutdown so a possible wait for a passive shutdown can wake up the shutdown waiter.

---
 fs/dlm/lockspace.c | 1 +
 1 file changed, 1 insertion(+)
fs/dlm/lockspace.c +1 -0
index 23c2d7308050..10eddfa6c3d7 100644
@@ -793,6 +793,7 @@ static int release_lockspace(struct dlm_ls *ls, int force)
 
 	if (ls_count == 1) {
 		dlm_scand_stop();
+		dlm_clear_members(ls);
 		dlm_midcomms_shutdown();
 	}
 
Signature · 1 line
2.27.0