cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH dlm/next 01/12] fs: dlm: revert check required context while close
Date: Mon, 29 May 2023 17:44:29 -0400	[thread overview]
Message-ID: <20230529214440.2542721-1-aahringo@redhat.com> (raw)

This patch reverts commit 2c3fa6ae4d52 ("dlm: check required context
while close"). The function dlm_midcomms_close(), which will call later
dlm_lowcomms_close(), is called when the cluster manager tells the node
got fenced which means on midcomms/lowcomms layer to disconnect the node
from the cluster communication. The node can rejoin the cluster later.
This patch was ensuring no new message were able to be triggered when we
are in the close() function context. This was done by checking if the
lockspace has been stopped. However there is a missing check that we
only need to check specific lockspaces where the fenced node is member
of. This is currently complicated because there is no way to easily
check if a node is part of a specific lockspace without stopping the
recovery. For now we just revert this commit as it is just a check to
finding possible leaks of stopping lockspaces before close() is called.

Cc: stable at vger.kernel.org
Fixes: 2c3fa6ae4d52 ("dlm: check required context while close")
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
 fs/dlm/lockspace.c | 12 ------------
 fs/dlm/lockspace.h |  1 -
 fs/dlm/midcomms.c  |  3 ---
 3 files changed, 16 deletions(-)

diff --git a/fs/dlm/lockspace.c b/fs/dlm/lockspace.c
index 67261b7b1f0e..0455dddb0797 100644
--- a/fs/dlm/lockspace.c
+++ b/fs/dlm/lockspace.c
@@ -935,15 +935,3 @@ void dlm_stop_lockspaces(void)
 		log_print("dlm user daemon left %d lockspaces", count);
 }
 
-void dlm_stop_lockspaces_check(void)
-{
-	struct dlm_ls *ls;
-
-	spin_lock(&lslist_lock);
-	list_for_each_entry(ls, &lslist, ls_list) {
-		if (WARN_ON(!rwsem_is_locked(&ls->ls_in_recovery) ||
-			    !dlm_locking_stopped(ls)))
-			break;
-	}
-	spin_unlock(&lslist_lock);
-}
diff --git a/fs/dlm/lockspace.h b/fs/dlm/lockspace.h
index 03f4a4a3a871..47ebd4411926 100644
--- a/fs/dlm/lockspace.h
+++ b/fs/dlm/lockspace.h
@@ -27,7 +27,6 @@ struct dlm_ls *dlm_find_lockspace_local(void *id);
 struct dlm_ls *dlm_find_lockspace_device(int minor);
 void dlm_put_lockspace(struct dlm_ls *ls);
 void dlm_stop_lockspaces(void);
-void dlm_stop_lockspaces_check(void);
 int dlm_new_user_lockspace(const char *name, const char *cluster,
 			   uint32_t flags, int lvblen,
 			   const struct dlm_lockspace_ops *ops,
diff --git a/fs/dlm/midcomms.c b/fs/dlm/midcomms.c
index c02c43e4980a..3df916a568ba 100644
--- a/fs/dlm/midcomms.c
+++ b/fs/dlm/midcomms.c
@@ -136,7 +136,6 @@
 #include <net/tcp.h>
 
 #include "dlm_internal.h"
-#include "lockspace.h"
 #include "lowcomms.h"
 #include "config.h"
 #include "memory.h"
@@ -1491,8 +1490,6 @@ int dlm_midcomms_close(int nodeid)
 	if (nodeid == dlm_our_nodeid())
 		return 0;
 
-	dlm_stop_lockspaces_check();
-
 	idx = srcu_read_lock(&nodes_srcu);
 	/* Abort pending close/remove operation */
 	node = nodeid2node(nodeid, 0);
-- 
2.31.1


             reply	other threads:[~2023-05-29 21:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-29 21:44 Alexander Aring [this message]
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 02/12] fs: dlm: clear pending bit when queue was empty Alexander Aring
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 03/12] fs: dlm: fix missing pending to false Alexander Aring
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 04/12] fs: dlm: unregister memory at the very last Alexander Aring
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 05/12] fs: dlm: don't check othercon twice Alexander Aring
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 06/12] fs: dlm: cleanup STOP_IO bitflag set when stop io Alexander Aring
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 07/12] fs: dlm: move dlm_purge_lkb_callbacks to user module Alexander Aring
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 08/12] fs: dlm: warn about messages from left nodes Alexander Aring
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 09/12] fs: dlm: filter ourself midcomms calls Alexander Aring
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 10/12] fs: dlm: handle lkb wait count as atomic_t Alexander Aring
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 11/12] fs: dlm: handle sequence numbers as atomic Alexander Aring
2023-05-29 21:44 ` [Cluster-devel] [PATCH dlm/next 12/12] fs: dlm: add send ack threshold and append acks to msgs Alexander Aring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230529214440.2542721-1-aahringo@redhat.com \
    --to=aahringo@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).