aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-07-25 09:58:54 -0400
committerDave Kleikamp <shaggy@austin.ibm.com>2005-07-25 09:58:54 -0400
commitc2783f3a625b2aba943ef94623e277557a91a448 (patch)
treee262b750f4e8cd5785417a55dd68b427e31bd86f
parentc40c202493d18de42fcd0b8b5d68c22aefb70f03 (diff)
JFS: Don't set log_SYNCBARRIER when log->active == 0
If a metadata page is kept active, it is possible that the sync barrier logic continues to trigger, even if all active transactions have been phyically written to the journal. This can cause a hang, since the completion of the journal I/O is what unsets the sync barrier flag to allow new transactions to be created. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
-rw-r--r--fs/jfs/jfs_logmgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index 79d07624bfe1..22815e88e7cc 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -1030,7 +1030,8 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
1030 * starting until all current transactions are completed 1030 * starting until all current transactions are completed
1031 * by setting syncbarrier flag. 1031 * by setting syncbarrier flag.
1032 */ 1032 */
1033 if (written > LOGSYNC_BARRIER(logsize) && logsize > 32 * LOGPSIZE) { 1033 if (!test_bit(log_SYNCBARRIER, &log->flag) &&
1034 (written > LOGSYNC_BARRIER(logsize)) && log->active) {
1034 set_bit(log_SYNCBARRIER, &log->flag); 1035 set_bit(log_SYNCBARRIER, &log->flag);
1035 jfs_info("log barrier on: lsn=0x%x syncpt=0x%x", lsn, 1036 jfs_info("log barrier on: lsn=0x%x syncpt=0x%x", lsn,
1036 log->syncpt); 1037 log->syncpt);