Skip to content

Commit

Permalink
JFS: Don't set log_SYNCBARRIER when log->active == 0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dave Kleikamp committed Jul 25, 2005
1 parent c40c202 commit c2783f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/jfs/jfs_logmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,8 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
* starting until all current transactions are completed
* by setting syncbarrier flag.
*/
if (written > LOGSYNC_BARRIER(logsize) && logsize > 32 * LOGPSIZE) {
if (!test_bit(log_SYNCBARRIER, &log->flag) &&
(written > LOGSYNC_BARRIER(logsize)) && log->active) {
set_bit(log_SYNCBARRIER, &log->flag);
jfs_info("log barrier on: lsn=0x%x syncpt=0x%x", lsn,
log->syncpt);
Expand Down

0 comments on commit c2783f3

Please sign in to comment.