Skip to content

Commit

Permalink
ocfs2: Allow for debugging of transaction extends
Browse files Browse the repository at this point in the history
The nastiest cases of transaction extends are also the rarest. We can expose
them more quickly at the expense of performance by going straight to the
journal_restart() in ocfs2_extend_trans(). Wrap things in OCFS2_DEBUG_FS so
that we only do this when "expensive debugging" is turned on.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
  • Loading branch information
Mark Fasheh committed Dec 17, 2007
1 parent 92295d8 commit 0879c58
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/ocfs2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,15 @@ int ocfs2_extend_trans(handle_t *handle, int nblocks)

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

#ifdef OCFS2_DEBUG_FS
status = 1;
#else
status = journal_extend(handle, nblocks);
if (status < 0) {
mlog_errno(status);
goto bail;
}
#endif

if (status > 0) {
mlog(0, "journal_extend failed, trying journal_restart\n");
Expand Down

0 comments on commit 0879c58

Please sign in to comment.