This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".
The branch, master has been updated
via ebda3b163cabd4e0f04127637ed73caf9caf2704 (commit)
via 5256ae5d59dd44bfb4b551a2ce1cb9eac71be845 (commit)
from f5a705d3ed1843f403f0d03aeae447f0b6ca10a9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
Define MAX_LS_NAME 64, and note that it should match MAX_LOCKSPACE_LEN in
dlmconstants.h. Including linux/dlm.h directly is difficult because some files
need to include libdlm.h which doesn't combine nicely with linux/dlm.h.
Signed-off-by: David Teigland <teigland@redhat.com>
Attempting to bring some sanity to handling of max lockspace name length
and max resource name length. A new kernel patch creates single authoritative
definitions in linux/dlmconstants.h:
These definitions are copied in libdlm.h so that user apps don't need to
include the kernel header. libdlm itself uses the dlmconstants.h
definitions, and now checks both resource and lockspace name params against
these definitions before calling into dlm-kernel. dlm-kernel checks each
of the input names against these definitions when creating a new rsb or ls.
Signed-off-by: David Teigland <teigland@redhat.com>
+/*
+ * These two lengths are copied from linux/dlmconstants.h
+ * They are the max length of a lockspace name and the max length of a
+ * resource name.
+ */
+
+#define DLM_LOCKSPACE_LEN 64
#define DLM_RESNAME_MAXLEN 64
struct dlm_lksb {
diff --git a/group/dlm_controld/action.c b/group/dlm_controld/action.c
index b7c422b..6d2db05 100644
--- a/group/dlm_controld/action.c
+++ b/group/dlm_controld/action.c
@@ -17,7 +17,7 @@ static int dir_members[MAX_NODES];
static int dir_members_count;
static int comms_nodes[MAX_NODES];
static int comms_nodes_count;
-static char mg_name[MAXNAME+1];
+static char mg_name[MAX_LS_NAME+1];
-#define MAXARGS 8
-#define MAXLINE 256
-#define MAXCON 4
-#define MAXNAME 255
-#define MAX_NODES 256 /* should be same as MAX_GROUP_MEMBERS */
+/* Maximum lockspace name length, should match MAX_LOCKSPACE_NAME in
+ linux/dlmconstants.h (copied in libdlm.h). The libcpg limit is
+ larger at CPG_MAX_NAME_LENGTH 128. Our cpg name includes a "dlm:"
+ prefix before the lockspace name. */
+
+#define MAX_LS_NAME 64
+
+/* Maximum members of a lockspace, should match CPG_MEMBERS_MAX in openais/cpg.h.
+ There are no max defines in dlm-kernel for lockspace members. */
+
+#define MAX_NODES 128
+
+/* Maximum number of IP addresses per node, when using SCTP and multi-ring in
+ openais. In dlm-kernel this is DLM_MAX_ADDR_COUNT, currently 3. */
+
#define MAX_NODE_ADDRESSES 4
+
+/* Max string length printed on a line, for debugging/dump output. */
+
+#define MAXLINE 256
+
+/* Size of the circular debug buffer. */
+
#define DUMP_SIZE (1024 * 1024)
extern int daemon_debug_opt;
@@ -139,7 +156,7 @@ struct dlm_header {
group_handle_t gh;
static int cb_action;
-static char cb_name[MAX_GROUP_NAME_LEN+1];
+static char cb_name[MAX_LS_NAME+1];
static int cb_event_nr;
static unsigned int cb_id;
static int cb_type;
static int cb_member_count;
-static int cb_members[MAX_GROUP_MEMBERS];
+static int cb_members[MAX_NODES];