summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/journal.c
diff options
context:
space:
mode:
authorMark Fasheh2007-12-04 01:43:01 +0100
committerMark Fasheh2007-12-17 19:51:23 +0100
commite8aed3450c0afd6fdb79ec233f806e3e69454dfe (patch)
treeaa83824230c1b0c58fe9ec68d007c35f42b90fa7 /fs/ocfs2/journal.c
parentocfs2: Allow for debugging of transaction extends (diff)
downloadkernel-qcow2-linux-e8aed3450c0afd6fdb79ec233f806e3e69454dfe.tar.gz
kernel-qcow2-linux-e8aed3450c0afd6fdb79ec233f806e3e69454dfe.tar.xz
kernel-qcow2-linux-e8aed3450c0afd6fdb79ec233f806e3e69454dfe.zip
ocfs2: Re-journal buffers after transaction extend
ocfs2_extend_trans() might call journal_restart() which will commit dirty buffers and then restart the transaction. This means that any buffers which still need changes should be passed to journal_access() again. Some paths during extend weren't doing this right. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/journal.c')
-rw-r--r--fs/ocfs2/journal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 0e1250c2ef44..8d81f6c1b877 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -174,6 +174,12 @@ int ocfs2_commit_trans(struct ocfs2_super *osb,
* transaction. extend_trans will either extend the current handle by
* nblocks, or commit it and start a new one with nblocks credits.
*
+ * This might call journal_restart() which will commit dirty buffers
+ * and then restart the transaction. Before calling
+ * ocfs2_extend_trans(), any changed blocks should have been
+ * dirtied. After calling it, all blocks which need to be changed must
+ * go through another set of journal_access/journal_dirty calls.
+ *
* WARNING: This will not release any semaphores or disk locks taken
* during the transaction, so make sure they were taken *before*
* start_trans or we'll have ordering deadlocks.