[Ocfs2-commits] khackel commits r2136 - trunk/fs/ocfs2/dlm

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Apr 12 01:09:16 CDT 2005


Author: khackel
Signed-off-by: manish
Date: 2005-04-12 01:09:15 -0500 (Tue, 12 Apr 2005)
New Revision: 2136

Modified:
   trunk/fs/ocfs2/dlm/dlmast.c
   trunk/fs/ocfs2/dlm/dlmcommon.h
   trunk/fs/ocfs2/dlm/dlmconvert.c
   trunk/fs/ocfs2/dlm/dlmdebug.c
   trunk/fs/ocfs2/dlm/dlmdomain.c
   trunk/fs/ocfs2/dlm/dlmlock.c
   trunk/fs/ocfs2/dlm/dlmmaster.c
   trunk/fs/ocfs2/dlm/dlmrecovery.c
   trunk/fs/ocfs2/dlm/dlmthread.c
   trunk/fs/ocfs2/dlm/dlmunlock.c
Log:
* normalize function naming for a few lockres functions 
  (eg. __dlm_unhash_lockres instead of __dlm_unhash_lock)
* will need real _lock functions shortly, so this preps for a later commit

Signed-off-by: manish



Modified: trunk/fs/ocfs2/dlm/dlmast.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmast.c	2005-04-12 04:13:38 UTC (rev 2135)
+++ trunk/fs/ocfs2/dlm/dlmast.c	2005-04-12 06:09:15 UTC (rev 2136)
@@ -253,7 +253,7 @@
 		goto leave;
 	}
 
-	res = dlm_lookup_lock(dlm, name, locklen);
+	res = dlm_lookup_lockres(dlm, name, locklen);
 	if (!res) {
 		dlmprintk("eek! got %sast for unknown lockres!  cookie=%llu, "
 			  "name=%.*s, namelen=%u\n", 

Modified: trunk/fs/ocfs2/dlm/dlmcommon.h
===================================================================
--- trunk/fs/ocfs2/dlm/dlmcommon.h	2005-04-12 04:13:38 UTC (rev 2135)
+++ trunk/fs/ocfs2/dlm/dlmcommon.h	2005-04-12 06:09:15 UTC (rev 2136)
@@ -826,13 +826,13 @@
 void dlm_purge_lockres(dlm_ctxt *dlm, dlm_lock_resource *lockres);
 void dlm_lockres_get(dlm_lock_resource *res);
 void dlm_lockres_put(dlm_lock_resource *res);
-void __dlm_unhash_lock(dlm_lock_resource *res);
-void __dlm_insert_lock(dlm_ctxt *dlm,
+void __dlm_unhash_lockres(dlm_lock_resource *res);
+void __dlm_insert_lockres(dlm_ctxt *dlm,
 		       dlm_lock_resource *res);
-dlm_lock_resource * __dlm_lookup_lock(dlm_ctxt *dlm,
+dlm_lock_resource * __dlm_lookup_lockres(dlm_ctxt *dlm,
 				      const char *name,
 				      unsigned int len);
-dlm_lock_resource * dlm_lookup_lock(dlm_ctxt *dlm,
+dlm_lock_resource * dlm_lookup_lockres(dlm_ctxt *dlm,
 				    const char *name,
 				    unsigned int len);
 

Modified: trunk/fs/ocfs2/dlm/dlmconvert.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmconvert.c	2005-04-12 04:13:38 UTC (rev 2135)
+++ trunk/fs/ocfs2/dlm/dlmconvert.c	2005-04-12 06:09:15 UTC (rev 2136)
@@ -422,7 +422,7 @@
 		  (flags & LKM_GET_LVB ? "get lvb" : "none"));
 
 	status = DLM_IVLOCKID;
-	res = dlm_lookup_lock(dlm, cnv->name, cnv->namelen);
+	res = dlm_lookup_lockres(dlm, cnv->name, cnv->namelen);
 	if (!res)
 		goto leave;
 

Modified: trunk/fs/ocfs2/dlm/dlmdebug.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmdebug.c	2005-04-12 04:13:38 UTC (rev 2135)
+++ trunk/fs/ocfs2/dlm/dlmdebug.c	2005-04-12 06:09:15 UTC (rev 2136)
@@ -289,7 +289,7 @@
 		goto leave;
 	}
 
-       	res = dlm_lookup_lock(dlm, resname, strlen(resname));
+       	res = dlm_lookup_lockres(dlm, resname, strlen(resname));
 	if (!res) {
 		printk("bad lockres!\n");
 		dlm_put(dlm);

Modified: trunk/fs/ocfs2/dlm/dlmdomain.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmdomain.c	2005-04-12 04:13:38 UTC (rev 2135)
+++ trunk/fs/ocfs2/dlm/dlmdomain.c	2005-04-12 06:09:15 UTC (rev 2136)
@@ -68,13 +68,13 @@
 
 static void dlm_unregister_domain_handlers(dlm_ctxt *dlm);
 
-void __dlm_unhash_lock(dlm_lock_resource *lockres)
+void __dlm_unhash_lockres(dlm_lock_resource *lockres)
 {
 	list_del_init(&lockres->list);
 	dlm_lockres_put(lockres);
 }
 
-void __dlm_insert_lock(dlm_ctxt *dlm,
+void __dlm_insert_lockres(dlm_ctxt *dlm,
 		       dlm_lock_resource *res)
 {
 	struct list_head *bucket;
@@ -92,7 +92,7 @@
 	list_add_tail(&res->list, bucket);
 }
 
-dlm_lock_resource * __dlm_lookup_lock(dlm_ctxt *dlm,
+dlm_lock_resource * __dlm_lookup_lockres(dlm_ctxt *dlm,
 				      const char *name,
 				      unsigned int len)
 {
@@ -125,7 +125,7 @@
 	return tmpres;
 }
 
-dlm_lock_resource * dlm_lookup_lock(dlm_ctxt *dlm, 
+dlm_lock_resource * dlm_lookup_lockres(dlm_ctxt *dlm, 
 				    const char *name,
 				    unsigned int len)
 {
@@ -134,7 +134,7 @@
 	BUG_ON(!dlm);
 
 	spin_lock(&dlm->spinlock);
-	res = __dlm_lookup_lock(dlm, name, len);
+	res = __dlm_lookup_lockres(dlm, name, len);
 	spin_unlock(&dlm->spinlock);
 	return res;
 }

Modified: trunk/fs/ocfs2/dlm/dlmlock.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmlock.c	2005-04-12 04:13:38 UTC (rev 2135)
+++ trunk/fs/ocfs2/dlm/dlmlock.c	2005-04-12 06:09:15 UTC (rev 2136)
@@ -413,7 +413,7 @@
 	}
 
 	status = DLM_IVLOCKID;
-	res = dlm_lookup_lock(dlm, name, namelen);
+	res = dlm_lookup_lockres(dlm, name, namelen);
 	if (!res)
 		goto leave;
 

Modified: trunk/fs/ocfs2/dlm/dlmmaster.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmmaster.c	2005-04-12 04:13:38 UTC (rev 2135)
+++ trunk/fs/ocfs2/dlm/dlmmaster.c	2005-04-12 06:09:15 UTC (rev 2136)
@@ -548,7 +548,7 @@
 
 lookup:
 	spin_lock(&dlm->spinlock);
-	tmpres = __dlm_lookup_lock(dlm, lockid, namelen);
+	tmpres = __dlm_lookup_lockres(dlm, lockid, namelen);
 	if (tmpres) {
 		spin_unlock(&dlm->spinlock);
 
@@ -588,7 +588,7 @@
 		 * DONE!  return right away */
 		spin_lock(&res->spinlock);
 		dlm_change_lockres_owner(dlm, res, dlm->node_num);
-		__dlm_insert_lock(dlm, res);
+		__dlm_insert_lockres(dlm, res);
 		spin_unlock(&res->spinlock);
 		spin_unlock(&dlm->spinlock);
 		/* lockres still marked IN_PROGRESS */
@@ -616,7 +616,7 @@
 			spin_lock(&dlm->spinlock);
 			spin_lock(&res->spinlock);
 			dlm_set_lockres_owner(dlm, res, tmpmle->master);
-			__dlm_insert_lock(dlm, res);
+			__dlm_insert_lockres(dlm, res);
 			spin_unlock(&res->spinlock);
 			spin_unlock(&dlm->spinlock);
 
@@ -645,7 +645,7 @@
 	 * to come in and put their mle on the list and sleep ?? */
 
 	/* finally add the lockres to its hash bucket */
-	__dlm_insert_lock(dlm, res);
+	__dlm_insert_lockres(dlm, res);
 	spin_unlock(&dlm->spinlock);
 
 	if (blocked) {
@@ -927,7 +927,7 @@
 
 way_up_top:
 	spin_lock(&dlm->spinlock);
-	res = __dlm_lookup_lock(dlm, name, namelen);
+	res = __dlm_lookup_lockres(dlm, name, namelen);
 	if (res) {
 		spin_unlock(&dlm->spinlock);
 
@@ -1201,7 +1201,7 @@
 
 	/* ok everything checks out with the MLE
 	 * now check to see if there is a lockres */
-	res = __dlm_lookup_lock(dlm, name, namelen);
+	res = __dlm_lookup_lockres(dlm, name, namelen);
 	if (res) {
 		spin_lock(&res->spinlock);
 		DLM_ASSERT(!(res->state & DLM_LOCK_RES_RECOVERING));
@@ -1792,7 +1792,7 @@
 
 	/* check for pre-existing lock */
 	spin_lock(&dlm->spinlock);
-	res = __dlm_lookup_lock(dlm, name, namelen);
+	res = __dlm_lookup_lockres(dlm, name, namelen);
 	spin_lock(&dlm->master_lock);
 
 	if (res) {
@@ -1968,7 +1968,7 @@
 				  mle->master, mle->new_master);
 			/* if there is a lockres associated with this
 		 	 * mle, find it and set its owner to UNKNOWN */
-			res = __dlm_lookup_lock(dlm, mle->u.name.name, 
+			res = __dlm_lookup_lockres(dlm, mle->u.name.name, 
 						mle->u.name.len);
 			if (res) {
 				/* unfortunately if we hit this rare case, our 

Modified: trunk/fs/ocfs2/dlm/dlmrecovery.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmrecovery.c	2005-04-12 04:13:38 UTC (rev 2135)
+++ trunk/fs/ocfs2/dlm/dlmrecovery.c	2005-04-12 06:09:15 UTC (rev 2136)
@@ -1008,7 +1008,7 @@
 	/* lookup the lock to see if we have a secondary queue for this
 	 * already...  just add the locks in and this will have its owner 
 	 * and RECOVERY flag changed when it completes. */
-	res = dlm_lookup_lock(dlm, mres->lockname, mres->lockname_len);
+	res = dlm_lookup_lockres(dlm, mres->lockname, mres->lockname_len);
 	if (res) {
 	 	/* this will get a ref on res */
 		/* mark it as recovering/migrating and hash it */
@@ -1042,7 +1042,7 @@
 			goto leave;
 
 		/* to match the ref that we would have gotten if 
-		 * dlm_lookup_lock had succeeded */
+		 * dlm_lookup_lockres had succeeded */
 		dlm_lockres_get(res);
 
 		/* mark it as recovering/migrating and hash it */
@@ -1052,7 +1052,7 @@
 			res->state |= DLM_LOCK_RES_MIGRATING;
 	
 		spin_lock(&dlm->spinlock);
-		__dlm_insert_lock(dlm, res);
+		__dlm_insert_lockres(dlm, res);
 		spin_unlock(&dlm->spinlock);
 	}
 
@@ -1261,7 +1261,7 @@
 	dlm_master_requery_to_host(req);
 
 	spin_lock(&dlm->spinlock);
-	res = __dlm_lookup_lock(dlm, req->name, req->namelen);
+	res = __dlm_lookup_lockres(dlm, req->name, req->namelen);
 	if (res) {
 		spin_lock(&res->spinlock);
 		master = res->owner;

Modified: trunk/fs/ocfs2/dlm/dlmthread.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmthread.c	2005-04-12 04:13:38 UTC (rev 2135)
+++ trunk/fs/ocfs2/dlm/dlmthread.c	2005-04-12 06:09:15 UTC (rev 2136)
@@ -189,7 +189,7 @@
 		list_del_init(&lockres->purge);
 		dlm->purge_count--;
 	}
-	__dlm_unhash_lock(lockres);
+	__dlm_unhash_lockres(lockres);
 }
 
 static void dlm_run_purge_list(dlm_ctxt *dlm)

Modified: trunk/fs/ocfs2/dlm/dlmunlock.c
===================================================================
--- trunk/fs/ocfs2/dlm/dlmunlock.c	2005-04-12 04:13:38 UTC (rev 2135)
+++ trunk/fs/ocfs2/dlm/dlmunlock.c	2005-04-12 06:09:15 UTC (rev 2136)
@@ -333,7 +333,7 @@
 
 	dlmprintk("lvb: %s\n", flags & LKM_PUT_LVB ? "put lvb" : "none");
 
-	res = dlm_lookup_lock(dlm, unlock->name, unlock->namelen);
+	res = dlm_lookup_lockres(dlm, unlock->name, unlock->namelen);
 	if (!res) {
 		/* We assume here that a no lock resource simply means
 		 * it was migrated away and destroyed before the other



More information about the Ocfs2-commits mailing list