[Ocfs2-commits] rev 741 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Mar 1 17:41:34 CST 2004
Author: mfasheh
Date: 2004-03-01 17:41:32 -0600 (Mon, 01 Mar 2004)
New Revision: 741
Modified:
trunk/src/journal.c
Log:
* include a patch by Rusty Lynch <rusty at linux.co.intel.com>:
The following is a patch that fixes some small 2.6 issues with
journal.c
* journal_get_write_access now has an additional "credits" argument
that appears to be safe to pass in as null. (Other people are
doing it and the code in the latest bk tree always test for null
before attempting to incrementing it.)
* small typo in an ocfs_iget call
* remaining call to daemonize that is moved to the 2.6 safe
ocfs_daemonize call
* WARNING!!! Here is the thing I am not sure about!
The lock_journal/unlock_journal calls do not exist anymore.
There is a journal_[un]lock_updates() function, but it is
unclear when to use that function.
I just removed the [un]lock_journal calls around a line where
we were tweaking the commit interval.
Modified: trunk/src/journal.c
===================================================================
--- trunk/src/journal.c 2004-03-01 23:04:20 UTC (rev 740)
+++ trunk/src/journal.c 2004-03-01 23:41:32 UTC (rev 741)
@@ -656,7 +656,11 @@
break;
case OCFS_JOURNAL_ACCESS_WRITE:
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+ status = journal_get_write_access(handle->k_handle, bh, NULL);
+#else
status = journal_get_write_access(handle->k_handle, bh);
+#endif
break;
default:
@@ -899,7 +903,7 @@
OCFS_BH_PUT_DATA(bh);
fe = NULL;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- inode = ocfs_iget (sb, &args);
+ inode = ocfs_iget (osb->sb, &args);
#else
inode = ocfs_get_inode_from_offset(osb, args.offset, bh);
#endif
@@ -935,9 +939,7 @@
LOG_TRACE_STR("Returned from journal_init_inode");
LOG_TRACE_ARGS("k_journal->j_maxlen = %u\n", k_journal->j_maxlen);
- lock_journal(k_journal);
k_journal->j_commit_interval = OCFS_DEFAULT_COMMIT_INTERVAL;
- unlock_journal(k_journal);
/* yay, pass the proper info back to our journal structure. */
osb->journal.osb = osb;
@@ -1376,12 +1378,14 @@
ocfs_super *osb = ((struct ocfs_recover_arg *) arg)->osb;
int node_num = ((struct ocfs_recover_arg *) arg)->node_num;
int status = 0;
+ char proc[16];
LOG_ENTRY_ARGS("(node_num=%d, osb->node_num = %d)\n", node_num,
osb->node_num);
- daemonize();
- reparent_to_init();
+ sprintf (proc, "ocfs2rec-%d", osb->osb_id);
+ ocfs_daemonize (proc, strlen(proc));
+
#ifdef HAVE_NPTL
spin_lock_irq (¤t->sighand->siglock);
sigfillset(¤t->blocked);
@@ -1531,7 +1535,7 @@
OCFS_BH_PUT_DATA(bh);
fe = NULL;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
- inode = ocfs_iget (sb, &args);
+ inode = ocfs_iget (osb->sb, &args);
#else
inode = ocfs_get_inode_from_offset(osb, args.offset, bh);
#endif
More information about the Ocfs2-commits
mailing list