]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ocfs2: Allow for debugging of transaction extends
authorMark Fasheh <mark.fasheh@oracle.com>
Tue, 4 Dec 2007 00:42:19 +0000 (16:42 -0800)
committerMark Fasheh <mark.fasheh@oracle.com>
Mon, 17 Dec 2007 18:51:14 +0000 (10:51 -0800)
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>
fs/ocfs2/journal.c

index 7e5f7ce4761bed02343d0a01c75cced9bfec28a6..0e1250c2ef446ff6f0a21a98106fc489c0fec781 100644 (file)
@@ -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");