summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/journal.c
diff options
context:
space:
mode:
authorMark Fasheh <mark.fasheh@oracle.com>2007-12-04 01:42:19 +0100
committerMark Fasheh <mark.fasheh@oracle.com>2007-12-17 19:51:14 +0100
commit0879c584ffcccd50a8d0f72cab3a51702613f901 (patch)
tree7ed963ab1a1ddda0f3b9dc31f1379243b44b555c /fs/ocfs2/journal.c
parentocfs2: Don't panic when truncating an empty extent (diff)
downloadlinux-0879c584ffcccd50a8d0f72cab3a51702613f901.tar.xz
linux-0879c584ffcccd50a8d0f72cab3a51702613f901.zip
ocfs2: Allow for debugging of transaction extends
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>
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r--fs/ocfs2/journal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 7e5f7ce4761b..0e1250c2ef44 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -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");