Lines Matching refs:log

151 static void diLog(struct jfs_log *log, struct tblock *tblk, struct lrd *lrd,
153 static void dataLog(struct jfs_log *log, struct tblock *tblk, struct lrd *lrd,
155 static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
157 static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
162 static void txLog(struct jfs_log *log, struct tblock *tblk,
166 static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
353 struct jfs_log *log; in txBegin() local
356 log = JFS_SBI(sb)->log; in txBegin()
358 if (!log) { in txBegin()
372 if (test_bit(log_SYNCBARRIER, &log->flag) || in txBegin()
373 test_bit(log_QUIESCE, &log->flag)) { in txBegin()
375 TXN_SLEEP(&log->syncwait); in txBegin()
427 ++log->logtid; in txBegin()
428 tblk->logtid = log->logtid; in txBegin()
430 ++log->active; in txBegin()
455 struct jfs_log *log; in txBeginAnon() local
457 log = JFS_SBI(sb)->log; in txBeginAnon()
466 if (test_bit(log_SYNCBARRIER, &log->flag) || in txBeginAnon()
467 test_bit(log_QUIESCE, &log->flag)) { in txBeginAnon()
469 TXN_SLEEP(&log->syncwait); in txBeginAnon()
496 struct jfs_log *log; in txEnd() local
507 log = JFS_SBI(tblk->sb)->log; in txEnd()
521 spin_lock_irq(&log->gclock); // LOGGC_LOCK in txEnd()
523 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txEnd()
540 if (--log->active == 0) { in txEnd()
541 clear_bit(log_FLUSH, &log->flag); in txEnd()
546 if (test_bit(log_SYNCBARRIER, &log->flag)) { in txEnd()
550 jfs_syncpt(log, 1); in txEnd()
552 jfs_info("log barrier off: 0x%x", log->lsn); in txEnd()
555 clear_bit(log_SYNCBARRIER, &log->flag); in txEnd()
558 TXN_WAKEUP(&log->syncwait); in txEnd()
907 struct jfs_log *log; in txUnlock() local
912 log = JFS_SBI(tblk->sb)->log; in txUnlock()
936 LOGSYNC_LOCK(log, flags); in txUnlock()
938 logdiff(difft, tblk->clsn, log); in txUnlock()
939 logdiff(diffp, mp->clsn, log); in txUnlock()
944 LOGSYNC_UNLOCK(log, flags); in txUnlock()
975 LOGSYNC_LOCK(log, flags); in txUnlock()
976 log->count--; in txUnlock()
978 LOGSYNC_UNLOCK(log, flags); in txUnlock()
1135 struct jfs_log *log; in txCommit() local
1161 log = JFS_SBI(sb)->log; in txCommit()
1162 cd.log = log; in txCommit()
1265 txLog(log, tblk, &cd); in txCommit()
1303 lmLog(log, tblk, lrd, NULL); in txCommit()
1305 lmGroupCommit(log, tblk); in txCommit()
1373 static void txLog(struct jfs_log *log, struct tblock *tblk, struct commit *cd) in txLog() argument
1391 lrd->log.redopage.fileset = cpu_to_le32(JFS_IP(ip)->fileset); in txLog()
1392 lrd->log.redopage.inode = cpu_to_le32(ip->i_ino); in txLog()
1397 xtLog(log, tblk, lrd, tlck); in txLog()
1401 dtLog(log, tblk, lrd, tlck); in txLog()
1405 diLog(log, tblk, lrd, tlck, cd); in txLog()
1409 mapLog(log, tblk, lrd, tlck); in txLog()
1413 dataLog(log, tblk, lrd, tlck); in txLog()
1429 static void diLog(struct jfs_log *log, struct tblock *tblk, struct lrd *lrd, in diLog() argument
1439 lrd->log.redopage.type = cpu_to_le16(LOG_INODE); in diLog()
1440 lrd->log.redopage.l2linesize = cpu_to_le16(L2INODESLOTSIZE); in diLog()
1442 pxd = &lrd->log.redopage.pxd; in diLog()
1453 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in diLog()
1483 lrd->log.noredoinoext.iagnum = in diLog()
1485 lrd->log.noredoinoext.inoext_idx = in diLog()
1490 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in diLog()
1507 static void dataLog(struct jfs_log *log, struct tblock *tblk, struct lrd *lrd, in dataLog() argument
1516 lrd->log.redopage.type = cpu_to_le16(LOG_DATA); in dataLog()
1517 lrd->log.redopage.l2linesize = cpu_to_le16(L2DATASLOTSIZE); in dataLog()
1519 pxd = &lrd->log.redopage.pxd; in dataLog()
1540 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dataLog()
1553 static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in dtLog() argument
1563 lrd->log.redopage.type = cpu_to_le16(LOG_DTREE); in dtLog()
1564 lrd->log.redopage.l2linesize = cpu_to_le16(L2DTSLOTSIZE); in dtLog()
1566 pxd = &lrd->log.redopage.pxd; in dtLog()
1569 lrd->log.redopage.type |= cpu_to_le16(LOG_BTROOT); in dtLog()
1584 lrd->log.redopage.type |= cpu_to_le16(LOG_EXTEND); in dtLog()
1586 lrd->log.redopage.type |= cpu_to_le16(LOG_NEW); in dtLog()
1590 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dtLog()
1619 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dtLog()
1641 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in dtLog()
1656 static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in xtLog() argument
1673 lrd->log.redopage.type = cpu_to_le16(LOG_XTREE); in xtLog()
1674 lrd->log.redopage.l2linesize = cpu_to_le16(L2XTSLOTSIZE); in xtLog()
1676 page_pxd = &lrd->log.redopage.pxd; in xtLog()
1679 lrd->log.redopage.type |= cpu_to_le16(LOG_BTROOT); in xtLog()
1682 lrd->log.redopage.type |= in xtLog()
1709 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1800 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in xtLog()
1806 cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1815 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEXADLIST); in xtLog()
1818 lrd->log.updatemap.nxd = in xtLog()
1824 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1919 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1933 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEPXD); in xtLog()
1934 lrd->log.updatemap.nxd = cpu_to_le16(1); in xtLog()
1935 lrd->log.updatemap.pxd = pxdlock->pxd; in xtLog()
1938 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in xtLog()
1950 lrd->log.updatemap.type = in xtLog()
1954 lrd->log.updatemap.nxd = in xtLog()
1961 cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
2039 static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in mapLog() argument
2059 pxd = &lrd->log.redopage.pxd; in mapLog()
2061 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2074 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEPXD); in mapLog()
2075 lrd->log.updatemap.nxd = cpu_to_le16(1); in mapLog()
2076 lrd->log.updatemap.pxd = pxdlock->pxd; in mapLog()
2077 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2101 lrd->log.updatemap.type = in mapLog()
2104 lrd->log.updatemap.type = in mapLog()
2106 lrd->log.updatemap.nxd = cpu_to_le16(1); in mapLog()
2107 lrd->log.updatemap.pxd = pxdlock->pxd; in mapLog()
2109 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2653 struct jfs_log *log; in txLazyCommit() local
2667 log = (struct jfs_log *) JFS_SBI(tblk->sb)->log; in txLazyCommit()
2669 spin_lock_irq(&log->gclock); // LOGGC_LOCK in txLazyCommit()
2674 log->gcrtc--; in txLazyCommit()
2682 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txLazyCommit()
2687 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txLazyCommit()
2795 struct jfs_log *log = mp->log; in LogSyncRelease() local
2798 assert(log); in LogSyncRelease()
2816 struct jfs_log *log = JFS_SBI(sb)->log; in txQuiesce() local
2819 set_bit(log_QUIESCE, &log->flag); in txQuiesce()
2860 jfs_flush_journal(log, 0); in txQuiesce()
2870 struct jfs_log *log = JFS_SBI(sb)->log; in txResume() local
2872 clear_bit(log_QUIESCE, &log->flag); in txResume()
2873 TXN_WAKEUP(&log->syncwait); in txResume()