[Ocfs2-commits] mfasheh commits r1045 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Jun 10 15:34:23 CDT 2004


Author: mfasheh
Date: 2004-06-10 14:34:21 -0500 (Thu, 10 Jun 2004)
New Revision: 1045

Modified:
   trunk/src/journal.c
Log:
* a quick cleanup pass in journal.c



Modified: trunk/src/journal.c
===================================================================
--- trunk/src/journal.c	2004-06-10 08:33:33 UTC (rev 1044)
+++ trunk/src/journal.c	2004-06-10 19:34:21 UTC (rev 1045)
@@ -39,7 +39,7 @@
 } release_locks_action;
 
 static int ocfs_reset_publish (ocfs_super * osb, __u64 node_num);
-static int ocfs_journal_release_locks(ocfs_journal_handle *handle, release_locks_action action);
+static int ocfs_handle_release_locks(ocfs_journal_handle *handle, release_locks_action action);
 static int ocfs_force_read_journal(ocfs_super *osb, __u64 size, 
 				   struct inode *inode);
 static int ocfs_recover_vol(struct _ocfs_super *osb, int node_num);
@@ -232,7 +232,7 @@
 /* This does no locking of the handle. If the handle is on
  * journal->commited, then you want to be holding the commit_sem
  * before calling this. */
-static int ocfs_journal_release_locks(ocfs_journal_handle *handle, 
+static int ocfs_handle_release_locks(ocfs_journal_handle *handle, 
 				      release_locks_action action)
 {
 	ocfs_super *osb;
@@ -447,7 +447,7 @@
 /* done: */
 	if (checkpoint) {
 		/* Release locks associated with this handle. */
-		retval = ocfs_journal_release_locks(handle, TRANS_COMMIT);
+		retval = ocfs_handle_release_locks(handle, TRANS_COMMIT);
 		if (retval < 0)
 			LOG_ERROR_STATUS(retval);
 	} else {
@@ -609,7 +609,7 @@
 		brelse(handle->buffs[i]);
 
 	/* drop locks associated with the handle here. */
-	retval = ocfs_journal_release_locks(handle, TRANS_ABORT);
+	retval = ocfs_handle_release_locks(handle, TRANS_ABORT);
 	if (retval < 0)
 		LOG_ERROR_STATUS(retval);
 
@@ -802,7 +802,11 @@
 
 /* We are expecting to be run on the current running transaction, so
  * we use the spin_lock here. You really shouldn't be calling this on
- * other transactions anyway... */
+ * other transactions anyway... 
+ * 
+ * If you've passed the inode to the handle already (via
+ * ocfs_handle_add_inode), then req_io_sem should be true. 
+*/
 void ocfs_handle_add_lock(ocfs_journal_handle *handle, __u32 type, 
 			  __u32 flags, struct buffer_head *bh, 
 			  struct inode *inode, int req_io_sem) 
@@ -1689,7 +1693,7 @@
 	down(&commit->c_lock);
 	list_for_each_safe(p, n, &commit->c_list) {
 		handle = list_entry(p, ocfs_journal_handle, h_list);
-		tmpstat = ocfs_journal_release_locks(handle, TRANS_CACHE);
+		tmpstat = ocfs_handle_release_locks(handle, TRANS_CACHE);
 		if (tmpstat < 0)
 			LOG_ERROR_STATUS((status = tmpstat));
 		list_del(&(handle->h_list));



More information about the Ocfs2-commits mailing list