Skip to contentSkip to conversation

dlm_controld: change cluster mark value description

PATCH New Alexander Aring 1 participant 2 messages Nov 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 dlm_controld: change cluster mark value description

This patch change the cluster mark value description, because it's not accurate. The listen socket mark value will inherit it's mark value to all new connections on an accept(). The kernel will also set this "for all other connections mark value" for connect() as well, if the per nodeid mark value isn't specified.

---
 dlm_controld/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
dlm_controld/main.c +1 -1
index b3c258b5..41b03efb 100644
@@ -1786,7 +1786,7 @@ static void set_opt_defaults(void)
 	set_opt_default(mark_ind,
 			"mark", '\0', req_arg_uint,
 			0, NULL, 0,
-			"set mark value for the DLM in-kernel listen socket");
+			"set mark value for DLM if not explicit by nodeid specified");
 
 	set_opt_default(debug_logfile_ind,
 			"debug_logfile", 'L', no_arg,
Signature · 1 line
2.26.2
#1 lore raw

PATCH 2/2 dlm_controld: add option for port number

This patch adds an option to specify the port number for dlm. Although the cluster attribute is named tcp_port, you can declare the port value for any transport protocol. All nodes needs to have the same value, otherwise dlm will get into a deadlock.

---
 dlm_controld/action.c     | 4 ++++
 dlm_controld/dlm_daemon.h | 1 +
 dlm_controld/main.c       | 5 +++++
 3 files changed, 10 insertions(+)
dlm_controld/action.c +4 -0
index 9e18d286..0eff2799 100644
@@ -881,6 +881,10 @@ int setup_configfs_options(void)
 	    dlm_options[timewarn_ind].file_set)
 		set_configfs_cluster("timewarn_cs", NULL, opt(timewarn_ind));
 
+	if (dlm_options[port_ind].cli_set ||
+	    dlm_options[port_ind].file_set)
+		set_configfs_cluster("tcp_port", NULL, optu(port_ind));
+
 	set_configfs_cluster("mark", NULL, optu(mark_ind));
 
 	proto_name = opts(protocol_ind);
dlm_controld/dlm_daemon.h +1 -0
index 95848201..45b295ea 100644
@@ -99,6 +99,7 @@ enum {
         log_debug_ind,
         timewarn_ind,
         protocol_ind,
+        port_ind,
         debug_logfile_ind,
 	bind_all_ind,
         mark_ind,
dlm_controld/main.c +5 -0
index 41b03efb..c35756d4 100644
@@ -1778,6 +1778,11 @@ static void set_opt_defaults(void)
 			-1, "detect", 0,
 			"dlm kernel lowcomms protocol: tcp, sctp, detect");
 
+	set_opt_default(port_ind,
+			"port", 'R', req_arg_uint,
+			-1, NULL, 21064,
+			"dlm kernel lowcomms protocol port");
+
 	set_opt_default(bind_all_ind,
 			"bind_all", '\0', req_arg_int,
 			0, NULL, 0,
Signature · 1 line
2.26.2