aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/journal.h
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2006-10-09 21:11:45 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2006-12-01 21:28:28 -0500
commit1fabe1481fac9e01bf8bffa60a2307ef379aa5de (patch)
tree17092c1be837ed95c8f26646003e9e49cfdb9663 /fs/ocfs2/journal.h
parent65eff9ccf86d63eb5c3e9071450a36e4e4fa9564 (diff)
ocfs2: Remove struct ocfs2_journal_handle in favor of handle_t
This is mostly a search and replace as ocfs2_journal_handle is now no more than a container for a handle_t pointer. ocfs2_commit_trans() becomes very straight forward, and we remove some out of date comments / code. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/journal.h')
-rw-r--r--fs/ocfs2/journal.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h
index 3c0d15c5e49c..d86cb960b7ec 100644
--- a/fs/ocfs2/journal.h
+++ b/fs/ocfs2/journal.h
@@ -37,7 +37,6 @@ enum ocfs2_journal_state {
37 37
38struct ocfs2_super; 38struct ocfs2_super;
39struct ocfs2_dinode; 39struct ocfs2_dinode;
40struct ocfs2_journal_handle;
41 40
42struct ocfs2_journal { 41struct ocfs2_journal {
43 enum ocfs2_journal_state j_state; /* Journals current state */ 42 enum ocfs2_journal_state j_state; /* Journals current state */
@@ -133,10 +132,6 @@ static inline void ocfs2_inode_set_new(struct ocfs2_super *osb,
133 spin_unlock(&trans_inc_lock); 132 spin_unlock(&trans_inc_lock);
134} 133}
135 134
136struct ocfs2_journal_handle {
137 handle_t *k_handle; /* kernel handle. */
138};
139
140/* Exported only for the journal struct init code in super.c. Do not call. */ 135/* Exported only for the journal struct init code in super.c. Do not call. */
141void ocfs2_complete_recovery(void *data); 136void ocfs2_complete_recovery(void *data);
142 137
@@ -200,7 +195,11 @@ static inline void ocfs2_checkpoint_inode(struct inode *inode)
200 * ocfs2_start_trans - Begin a transaction. Give it an upper estimate of 195 * ocfs2_start_trans - Begin a transaction. Give it an upper estimate of
201 * the number of blocks that will be changed during 196 * the number of blocks that will be changed during
202 * this handle. 197 * this handle.
203 * ocfs2_commit_trans - Complete a handle. 198 * ocfs2_commit_trans - Complete a handle. It might return -EIO if
199 * the journal was aborted. The majority of paths don't
200 * check the return value as an error there comes too
201 * late to do anything (and will be picked up in a
202 * later transaction).
204 * ocfs2_extend_trans - Extend a handle by nblocks credits. This may 203 * ocfs2_extend_trans - Extend a handle by nblocks credits. This may
205 * commit the handle to disk in the process, but will 204 * commit the handle to disk in the process, but will
206 * not release any locks taken during the transaction. 205 * not release any locks taken during the transaction.
@@ -215,10 +214,10 @@ static inline void ocfs2_checkpoint_inode(struct inode *inode)
215/* You must always start_trans with a number of buffs > 0, but it's 214/* You must always start_trans with a number of buffs > 0, but it's
216 * perfectly legal to go through an entire transaction without having 215 * perfectly legal to go through an entire transaction without having
217 * dirtied any buffers. */ 216 * dirtied any buffers. */
218struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb, 217handle_t *ocfs2_start_trans(struct ocfs2_super *osb,
219 int max_buffs); 218 int max_buffs);
220void ocfs2_commit_trans(struct ocfs2_super *osb, 219int ocfs2_commit_trans(struct ocfs2_super *osb,
221 struct ocfs2_journal_handle *handle); 220 handle_t *handle);
222int ocfs2_extend_trans(handle_t *handle, int nblocks); 221int ocfs2_extend_trans(handle_t *handle, int nblocks);
223 222
224/* 223/*
@@ -236,7 +235,7 @@ int ocfs2_extend_trans(handle_t *handle, int nblocks);
236#define OCFS2_JOURNAL_ACCESS_WRITE 1 235#define OCFS2_JOURNAL_ACCESS_WRITE 1
237#define OCFS2_JOURNAL_ACCESS_UNDO 2 236#define OCFS2_JOURNAL_ACCESS_UNDO 2
238 237
239int ocfs2_journal_access(struct ocfs2_journal_handle *handle, 238int ocfs2_journal_access(handle_t *handle,
240 struct inode *inode, 239 struct inode *inode,
241 struct buffer_head *bh, 240 struct buffer_head *bh,
242 int type); 241 int type);
@@ -259,7 +258,7 @@ int ocfs2_journal_access(struct ocfs2_journal_handle *handle,
259 * <modify the bh> 258 * <modify the bh>
260 * ocfs2_journal_dirty(handle, bh); 259 * ocfs2_journal_dirty(handle, bh);
261 */ 260 */
262int ocfs2_journal_dirty(struct ocfs2_journal_handle *handle, 261int ocfs2_journal_dirty(handle_t *handle,
263 struct buffer_head *bh); 262 struct buffer_head *bh);
264int ocfs2_journal_dirty_data(handle_t *handle, 263int ocfs2_journal_dirty_data(handle_t *handle,
265 struct buffer_head *bh); 264 struct buffer_head *bh);