Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42367
b: refs/heads/master
c: 1fc5814
h: refs/heads/master
i:
  42365: 3c3dfdf
  42363: 5d9884d
  42359: 6016383
  42351: cf58c17
  42335: 9662236
  42303: 23e04b2
  42239: 7e3b039
v: v3
  • Loading branch information
Mark Fasheh committed Dec 2, 2006
1 parent f60c00d commit 3c5adf1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01ddf1e186b3b12b38c9e44912e0fd6a1cbc882b
refs/heads/master: 1fc581467e52546195c7ee8233a34d63c1cc1322
2 changes: 1 addition & 1 deletion trunk/fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ static int ocfs2_replay_truncate_records(struct ocfs2_super *osb,
/* TODO: Perhaps we can calculate the bulk of the
* credits up front rather than extending like
* this. */
status = ocfs2_extend_trans(handle,
status = ocfs2_extend_trans(handle->k_handle,
OCFS2_TRUNCATE_LOG_FLUSH_ONE_REC);
if (status < 0) {
mlog_errno(status);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ static int ocfs2_extend_allocation(struct inode *inode,
credits = ocfs2_calc_extend_credits(osb->sb,
fe,
clusters_to_add);
status = ocfs2_extend_trans(handle, credits);
status = ocfs2_extend_trans(handle->k_handle, credits);
if (status < 0) {
/* handle still has to be committed at
* this point. */
Expand Down
9 changes: 3 additions & 6 deletions trunk/fs/ocfs2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,30 +323,27 @@ void ocfs2_commit_trans(struct ocfs2_journal_handle *handle)
* good because transaction ids haven't yet been recorded on the
* cluster locks associated with this handle.
*/
int ocfs2_extend_trans(struct ocfs2_journal_handle *handle,
int nblocks)
int ocfs2_extend_trans(handle_t *handle, int nblocks)
{
int status;

BUG_ON(!handle);
BUG_ON(!(handle->flags & OCFS2_HANDLE_STARTED));
BUG_ON(!nblocks);

mlog_entry_void();

mlog(0, "Trying to extend transaction by %d blocks\n", nblocks);

status = journal_extend(handle->k_handle, nblocks);
status = journal_extend(handle, nblocks);
if (status < 0) {
mlog_errno(status);
goto bail;
}

if (status > 0) {
mlog(0, "journal_extend failed, trying journal_restart\n");
status = journal_restart(handle->k_handle, nblocks);
status = journal_restart(handle, nblocks);
if (status < 0) {
handle->k_handle = NULL;
mlog_errno(status);
goto bail;
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/ocfs2/journal.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ struct ocfs2_journal_handle *ocfs2_start_trans(struct ocfs2_super *osb,
struct ocfs2_journal_handle *handle,
int max_buffs);
void ocfs2_commit_trans(struct ocfs2_journal_handle *handle);
int ocfs2_extend_trans(struct ocfs2_journal_handle *handle,
int nblocks);
int ocfs2_extend_trans(handle_t *handle, int nblocks);

/*
* Create access is for when we get a newly created buffer and we're
Expand Down

0 comments on commit 3c5adf1

Please sign in to comment.