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,
352 struct jfs_log *log; in txBegin() local
355 log = JFS_SBI(sb)->log; in txBegin()
357 if (!log) { in txBegin()
371 if (test_bit(log_SYNCBARRIER, &log->flag) || in txBegin()
372 test_bit(log_QUIESCE, &log->flag)) { in txBegin()
374 TXN_SLEEP(&log->syncwait); in txBegin()
426 ++log->logtid; in txBegin()
427 tblk->logtid = log->logtid; in txBegin()
429 ++log->active; in txBegin()
454 struct jfs_log *log; in txBeginAnon() local
456 log = JFS_SBI(sb)->log; in txBeginAnon()
465 if (test_bit(log_SYNCBARRIER, &log->flag) || in txBeginAnon()
466 test_bit(log_QUIESCE, &log->flag)) { in txBeginAnon()
468 TXN_SLEEP(&log->syncwait); in txBeginAnon()
495 struct jfs_log *log; in txEnd() local
506 log = JFS_SBI(tblk->sb)->log; in txEnd()
520 spin_lock_irq(&log->gclock); // LOGGC_LOCK in txEnd()
522 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txEnd()
539 if (--log->active == 0) { in txEnd()
540 clear_bit(log_FLUSH, &log->flag); in txEnd()
545 if (test_bit(log_SYNCBARRIER, &log->flag)) { in txEnd()
549 jfs_syncpt(log, 1); in txEnd()
551 jfs_info("log barrier off: 0x%x", log->lsn); in txEnd()
554 clear_bit(log_SYNCBARRIER, &log->flag); in txEnd()
557 TXN_WAKEUP(&log->syncwait); in txEnd()
906 struct jfs_log *log; in txUnlock() local
911 log = JFS_SBI(tblk->sb)->log; in txUnlock()
935 LOGSYNC_LOCK(log, flags); in txUnlock()
937 logdiff(difft, tblk->clsn, log); in txUnlock()
938 logdiff(diffp, mp->clsn, log); in txUnlock()
943 LOGSYNC_UNLOCK(log, flags); in txUnlock()
974 LOGSYNC_LOCK(log, flags); in txUnlock()
975 log->count--; in txUnlock()
977 LOGSYNC_UNLOCK(log, flags); in txUnlock()
1134 struct jfs_log *log; in txCommit() local
1160 log = JFS_SBI(sb)->log; in txCommit()
1161 cd.log = log; in txCommit()
1264 txLog(log, tblk, &cd); in txCommit()
1302 lmLog(log, tblk, lrd, NULL); in txCommit()
1304 lmGroupCommit(log, tblk); in txCommit()
1372 static void txLog(struct jfs_log *log, struct tblock *tblk, struct commit *cd) in txLog() argument
1390 lrd->log.redopage.fileset = cpu_to_le32(JFS_IP(ip)->fileset); in txLog()
1391 lrd->log.redopage.inode = cpu_to_le32(ip->i_ino); in txLog()
1396 xtLog(log, tblk, lrd, tlck); in txLog()
1400 dtLog(log, tblk, lrd, tlck); in txLog()
1404 diLog(log, tblk, lrd, tlck, cd); in txLog()
1408 mapLog(log, tblk, lrd, tlck); in txLog()
1412 dataLog(log, tblk, lrd, tlck); in txLog()
1428 static void diLog(struct jfs_log *log, struct tblock *tblk, struct lrd *lrd, in diLog() argument
1438 lrd->log.redopage.type = cpu_to_le16(LOG_INODE); in diLog()
1439 lrd->log.redopage.l2linesize = cpu_to_le16(L2INODESLOTSIZE); in diLog()
1441 pxd = &lrd->log.redopage.pxd; in diLog()
1452 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in diLog()
1482 lrd->log.noredoinoext.iagnum = in diLog()
1484 lrd->log.noredoinoext.inoext_idx = in diLog()
1489 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in diLog()
1506 static void dataLog(struct jfs_log *log, struct tblock *tblk, struct lrd *lrd, in dataLog() argument
1515 lrd->log.redopage.type = cpu_to_le16(LOG_DATA); in dataLog()
1516 lrd->log.redopage.l2linesize = cpu_to_le16(L2DATASLOTSIZE); in dataLog()
1518 pxd = &lrd->log.redopage.pxd; in dataLog()
1539 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dataLog()
1552 static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in dtLog() argument
1562 lrd->log.redopage.type = cpu_to_le16(LOG_DTREE); in dtLog()
1563 lrd->log.redopage.l2linesize = cpu_to_le16(L2DTSLOTSIZE); in dtLog()
1565 pxd = &lrd->log.redopage.pxd; in dtLog()
1568 lrd->log.redopage.type |= cpu_to_le16(LOG_BTROOT); in dtLog()
1583 lrd->log.redopage.type |= cpu_to_le16(LOG_EXTEND); in dtLog()
1585 lrd->log.redopage.type |= cpu_to_le16(LOG_NEW); in dtLog()
1589 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dtLog()
1618 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dtLog()
1640 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in dtLog()
1655 static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in xtLog() argument
1672 lrd->log.redopage.type = cpu_to_le16(LOG_XTREE); in xtLog()
1673 lrd->log.redopage.l2linesize = cpu_to_le16(L2XTSLOTSIZE); in xtLog()
1675 page_pxd = &lrd->log.redopage.pxd; in xtLog()
1678 lrd->log.redopage.type |= cpu_to_le16(LOG_BTROOT); in xtLog()
1681 lrd->log.redopage.type |= in xtLog()
1708 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1799 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in xtLog()
1805 cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1814 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEXADLIST); in xtLog()
1817 lrd->log.updatemap.nxd = in xtLog()
1823 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1918 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1932 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEPXD); in xtLog()
1933 lrd->log.updatemap.nxd = cpu_to_le16(1); in xtLog()
1934 lrd->log.updatemap.pxd = pxdlock->pxd; in xtLog()
1937 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in xtLog()
1949 lrd->log.updatemap.type = in xtLog()
1953 lrd->log.updatemap.nxd = in xtLog()
1960 cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
2038 static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in mapLog() argument
2058 pxd = &lrd->log.redopage.pxd; in mapLog()
2060 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2073 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEPXD); in mapLog()
2074 lrd->log.updatemap.nxd = cpu_to_le16(1); in mapLog()
2075 lrd->log.updatemap.pxd = pxdlock->pxd; in mapLog()
2076 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2100 lrd->log.updatemap.type = in mapLog()
2103 lrd->log.updatemap.type = in mapLog()
2105 lrd->log.updatemap.nxd = cpu_to_le16(1); in mapLog()
2106 lrd->log.updatemap.pxd = pxdlock->pxd; in mapLog()
2108 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2652 struct jfs_log *log; in txLazyCommit() local
2666 log = (struct jfs_log *) JFS_SBI(tblk->sb)->log; in txLazyCommit()
2668 spin_lock_irq(&log->gclock); // LOGGC_LOCK in txLazyCommit()
2673 log->gcrtc--; in txLazyCommit()
2681 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txLazyCommit()
2686 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txLazyCommit()
2793 struct jfs_log *log = mp->log; in LogSyncRelease() local
2796 assert(log); in LogSyncRelease()
2814 struct jfs_log *log = JFS_SBI(sb)->log; in txQuiesce() local
2817 set_bit(log_QUIESCE, &log->flag); in txQuiesce()
2858 jfs_flush_journal(log, 0); in txQuiesce()
2868 struct jfs_log *log = JFS_SBI(sb)->log; in txResume() local
2870 clear_bit(log_QUIESCE, &log->flag); in txResume()
2871 TXN_WAKEUP(&log->syncwait); in txResume()