Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 806
b: refs/heads/master
c: 1c62782
h: refs/heads/master
v: v3
  • Loading branch information
Dave Kleikamp authored and Linus Torvalds committed May 3, 2005
1 parent 9b10bfe commit 1692e1f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7fab479bebb96b1b4888bdae9b42e1fa9c5d3f38
refs/heads/master: 1c6278295d6482edaaaef5faa64b18f17b3319b7
17 changes: 14 additions & 3 deletions trunk/fs/jfs/jfs_logmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,9 +927,8 @@ static void lmPostGC(struct lbuf * bp)
* calculate new value of i_nextsync which determines when
* this code is called again.
*
* this is called only from lmLog().
*
* PARAMETER: ip - pointer to logs inode.
* PARAMETERS: log - log structure
* nosyncwait - 1 if called asynchronously
*
* RETURN: 0
*
Expand Down Expand Up @@ -1051,6 +1050,18 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
return lsn;
}

/*
* NAME: jfs_syncpt
*
* FUNCTION: write log SYNCPT record for specified log
*
* PARAMETERS: log - log structure
*/
void jfs_syncpt(struct jfs_log *log)
{ LOG_LOCK(log);
lmLogSync(log, 1);
LOG_UNLOCK(log);
}

/*
* NAME: lmLogOpen()
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/jfs/jfs_logmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -508,5 +508,6 @@ extern int lmLogShutdown(struct jfs_log * log);
extern int lmLogInit(struct jfs_log * log);
extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize);
extern void jfs_flush_journal(struct jfs_log * log, int wait);
extern void jfs_syncpt(struct jfs_log *log);

#endif /* _H_JFS_LOGMGR */
14 changes: 9 additions & 5 deletions trunk/fs/jfs/jfs_txnmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,25 +567,29 @@ 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 */
clear_bit(log_SYNCBARRIER, &log->flag);

/* 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();
}


Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/jfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,8 +558,10 @@ static int jfs_sync_fs(struct super_block *sb, int wait)
struct jfs_log *log = JFS_SBI(sb)->log;

/* log == NULL indicates read-only mount */
if (log)
if (log) {
jfs_flush_journal(log, wait);
jfs_syncpt(log);
}

return 0;
}
Expand Down

0 comments on commit 1692e1f

Please sign in to comment.