aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/journal.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r--fs/ocfs2/journal.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index f9d01e25298d..8d81f6c1b877 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -174,6 +174,12 @@ int ocfs2_commit_trans(struct ocfs2_super *osb,
174 * transaction. extend_trans will either extend the current handle by 174 * transaction. extend_trans will either extend the current handle by
175 * nblocks, or commit it and start a new one with nblocks credits. 175 * nblocks, or commit it and start a new one with nblocks credits.
176 * 176 *
177 * This might call journal_restart() which will commit dirty buffers
178 * and then restart the transaction. Before calling
179 * ocfs2_extend_trans(), any changed blocks should have been
180 * dirtied. After calling it, all blocks which need to be changed must
181 * go through another set of journal_access/journal_dirty calls.
182 *
177 * WARNING: This will not release any semaphores or disk locks taken 183 * WARNING: This will not release any semaphores or disk locks taken
178 * during the transaction, so make sure they were taken *before* 184 * during the transaction, so make sure they were taken *before*
179 * start_trans or we'll have ordering deadlocks. 185 * start_trans or we'll have ordering deadlocks.
@@ -193,11 +199,15 @@ int ocfs2_extend_trans(handle_t *handle, int nblocks)
193 199
194 mlog(0, "Trying to extend transaction by %d blocks\n", nblocks); 200 mlog(0, "Trying to extend transaction by %d blocks\n", nblocks);
195 201
202#ifdef OCFS2_DEBUG_FS
203 status = 1;
204#else
196 status = journal_extend(handle, nblocks); 205 status = journal_extend(handle, nblocks);
197 if (status < 0) { 206 if (status < 0) {
198 mlog_errno(status); 207 mlog_errno(status);
199 goto bail; 208 goto bail;
200 } 209 }
210#endif
201 211
202 if (status > 0) { 212 if (status > 0) {
203 mlog(0, "journal_extend failed, trying journal_restart\n"); 213 mlog(0, "journal_extend failed, trying journal_restart\n");
@@ -1277,11 +1287,12 @@ static int ocfs2_queue_orphans(struct ocfs2_super *osb,
1277 ocfs2_orphan_filldir); 1287 ocfs2_orphan_filldir);
1278 if (status) { 1288 if (status) {
1279 mlog_errno(status); 1289 mlog_errno(status);
1280 goto out; 1290 goto out_cluster;
1281 } 1291 }
1282 1292
1283 *head = priv.head; 1293 *head = priv.head;
1284 1294
1295out_cluster:
1285 ocfs2_meta_unlock(orphan_dir_inode, 0); 1296 ocfs2_meta_unlock(orphan_dir_inode, 0);
1286out: 1297out:
1287 mutex_unlock(&orphan_dir_inode->i_mutex); 1298 mutex_unlock(&orphan_dir_inode->i_mutex);