summaryrefslogtreecommitdiff
path: root/fs/jfs/jfs_txnmgr.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-05-02 12:25:08 -0600
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-02 22:23:53 -0700
commit1c6278295d6482edaaaef5faa64b18f17b3319b7 (patch)
tree226896c455d8a4996527c4a0ec5699956c657ec3 /fs/jfs/jfs_txnmgr.c
parent7fab479bebb96b1b4888bdae9b42e1fa9c5d3f38 (diff)
[PATCH] JFS: Write journal sync points more often
This patch adds jfs_syncpt, which calls lmLogSync to write sync points to the journal both in jfs_sync_fs and when sync barrier processing completes. lmLogSync accomplishes two things: 1) it pushes logged-but-dirty metadata pages to disk, and 2) it writes a sync record to the journal so that jfs_fsck doesn't need to replay more transactions than is necessary. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/jfs/jfs_txnmgr.c')
-rw-r--r--fs/jfs/jfs_txnmgr.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index bbc9c1407b55..e93d01aa12c4 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -567,9 +567,6 @@ void txEnd(tid_t tid)
* synchronize with logsync barrier
*/
if (test_bit(log_SYNCBARRIER, &log->flag)) {
- /* forward log syncpt */
- /* lmSync(log); */
-
jfs_info("log barrier off: 0x%x", log->lsn);
/* enable new transactions start */
@@ -577,15 +574,22 @@ void txEnd(tid_t tid)
/* wakeup all waitors for logsync barrier */
TXN_WAKEUP(&log->syncwait);
+
+ TXN_UNLOCK();
+
+ /* forward log syncpt */
+ jfs_syncpt(log);
+
+ goto wakeup;
}
}
+ TXN_UNLOCK();
+wakeup:
/*
* wakeup all waitors for a free tblock
*/
TXN_WAKEUP(&TxAnchor.freewait);
-
- TXN_UNLOCK();
}