[Ocfs2-commits] jlbec commits r1058 - branches/format-changes/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Fri Jun 11 19:44:01 CDT 2004
Author: jlbec
Date: 2004-06-11 18:43:59 -0500 (Fri, 11 Jun 2004)
New Revision: 1058
Modified:
branches/format-changes/src/journal.c
Log:
o Merged revision 1045 from trunk.
- [1045] journal.c cleanups.
Modified: branches/format-changes/src/journal.c
===================================================================
--- branches/format-changes/src/journal.c 2004-06-11 23:35:24 UTC (rev 1057)
+++ branches/format-changes/src/journal.c 2004-06-11 23:43:59 UTC (rev 1058)
@@ -57,7 +57,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);
@@ -252,7 +252,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;
@@ -467,7 +467,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 {
@@ -629,7 +629,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);
@@ -822,7 +822,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)
@@ -1697,7 +1701,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