[Ocfs2-commits] mfasheh commits r1026 - trunk/src
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Tue Jun 8 18:59:57 CDT 2004
Author: mfasheh
Date: 2004-06-08 17:59:55 -0500 (Tue, 08 Jun 2004)
New Revision: 1026
Modified:
trunk/src/journal.c
Log:
* remove ocfs_checkpoint_handle and ocfs_revoke_handle as they are no
longer used.
Modified: trunk/src/journal.c
===================================================================
--- trunk/src/journal.c 2004-06-08 22:53:13 UTC (rev 1025)
+++ trunk/src/journal.c 2004-06-08 22:59:55 UTC (rev 1026)
@@ -38,9 +38,6 @@
TRANS_CACHE
} release_locks_action;
-
-static int ocfs_checkpoint_handle(ocfs_journal_handle *handle);
-static int ocfs_revoke_handle(ocfs_journal_handle *handle);
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_force_read_journal(ocfs_super *osb, __u64 size,
@@ -173,93 +170,6 @@
return(NULL);
} /* ocfs_start_trans */
-#define OCFS_JOURNAL_CHECKPOINT_RETRIES 3
-static int ocfs_checkpoint_handle(ocfs_journal_handle *handle)
-{
- int retval = 0;
- ocfs_super *osb = NULL;
- int i;
-
- LOG_ENTRY();
-
- osb = handle->osb;
-
- if (!handle->num_buffs)
- goto done;
-
- /* Try up to 3 times to checkpoint the handle */
- for (i = 0; i < OCFS_JOURNAL_CHECKPOINT_RETRIES; i++) {
- retval = ocfs_write_bhs(osb, handle->buffs, handle->num_buffs,
- OCFS_BH_IGNORE_JBD, NULL);
- if (retval < 0)
- LOG_ERROR_STATUS(retval);
- else
- break;
- }
-
-done:
-
- LOG_EXIT_STATUS(retval);
- return(retval);
-}
-
-/* This function expects the journal handle to have already been
- * commited to disk (and it'd better have been checkpointed too!)
- *
- * Tells JBD to revoke these buffers from the on disk journal so if we
- * crash later, they won't be replayed.
- *
- * The call to journal_revoke does a brelse. It also winds up removing
- * the journal_head from the buffer, and therefore the JBD bit is no
- * longer set. We do a get_bh before calling journal_revoke so that
- * the count doesn't change.
- */
-static int ocfs_revoke_handle(ocfs_journal_handle *handle)
-{
- int retval = 0;
- struct buffer_head *bh;
- handle_t *new_handle = NULL;
- ocfs_journal *journal;
- int i;
-
- LOG_ENTRY();
-
- journal = handle->journal;
-
- if (!handle->num_buffs)
- goto done;
-
- new_handle = ocfs_journal_start(journal->k_journal, handle->num_buffs);
- if (IS_ERR(new_handle)) {
- retval = PTR_ERR(new_handle);
- new_handle = NULL;
- LOG_ERROR_STATUS(retval);
- LOG_ERROR_STR("Could not start revoke transaction!");
- goto done;
- }
-
- new_handle->h_sync = 1;
-
- for(i = 0; i < handle->num_buffs; i++) {
- bh = handle->buffs[i];
-
- get_bh(bh); /* want to keep this around after the revoke */
-
- retval = journal_revoke(new_handle, bh->b_blocknr, bh);
- if (retval < 0) {
- LOG_ERROR_STR("Could not revoke buffer!");
- goto done;
- }
- }
-
-done:
- if (new_handle)
- ocfs_journal_stop(new_handle);
-
- LOG_EXIT_STATUS(retval);
- return(retval);
-}
-
void ocfs_handle_add_inode(ocfs_journal_handle *handle, struct inode *inode)
{
if (!handle)
More information about the Ocfs2-commits
mailing list