[Ocfs2-commits] mfasheh commits r1647 - branches/dlm-glue/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon Nov 15 17:23:27 CST 2004


Author: mfasheh
Date: 2004-11-15 17:23:25 -0600 (Mon, 15 Nov 2004)
New Revision: 1647

Modified:
   branches/dlm-glue/src/dlmglue.c
Log:
* fix up header includes in dlmglue.c

* pass the proper key to the dlm_register_domain function.



Modified: branches/dlm-glue/src/dlmglue.c
===================================================================
--- branches/dlm-glue/src/dlmglue.c	2004-11-15 22:14:36 UTC (rev 1646)
+++ branches/dlm-glue/src/dlmglue.c	2004-11-15 23:23:25 UTC (rev 1647)
@@ -32,8 +32,9 @@
 
 #include <dlmutil.h>
 #include <dlmcommon.h>
+#include <dlmnm.h>
+#include <dlmnet.h>
 #include <dlmmod.h>
-#include <dlmnm.h>
 
 #include "ocfs_log.h"
 #include "ocfs.h"
@@ -1083,8 +1084,11 @@
 {
 	int status, pid;
 	char domain[NM_MAX_NAME_LEN];
+	u32 dlm_key;
 	dlm_ctxt *dlm = NULL;
 
+	LOG_ENTRY();
+
 	/* launch vote thread */
 	init_completion (&osb->vote_event_init);
 	pid = kernel_thread(ocfs2_vote_thread, osb,
@@ -1099,8 +1103,12 @@
 	memset(domain, 0, NM_MAX_NAME_LEN);
 	memcpy(domain, osb->uuid, MAX_VOL_ID_LENGTH);
 
-	/* where to get group name from? */
-	dlm = dlm_register_domain(domain, osb->group_name, 0);
+	/* used by the dlm code to make message headers unique, each
+	 * node in this domain must agree on this. For now we'll just
+	 * yank that off uuid. */
+	memcpy(&dlm_key, osb->uuid, sizeof(dlm_key));
+
+	dlm = dlm_register_domain(domain, osb->group_name, dlm_key);
 	if (!dlm) {
 		/* This is a best guess on return value... */
 		status = -ENOMEM;
@@ -1113,6 +1121,7 @@
 	status = 0;
 bail:
 
+	LOG_EXIT_STATUS(status);
 	return status;
 }
 



More information about the Ocfs2-commits mailing list