Lines Matching refs:log
164 static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
166 static int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
168 static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
170 static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
175 static int txLog(struct jfs_log * log, struct tblock * tblk,
179 static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
365 struct jfs_log *log; in txBegin() local
368 log = JFS_SBI(sb)->log; in txBegin()
379 if (test_bit(log_SYNCBARRIER, &log->flag) || in txBegin()
380 test_bit(log_QUIESCE, &log->flag)) { in txBegin()
382 TXN_SLEEP(&log->syncwait); in txBegin()
434 ++log->logtid; in txBegin()
435 tblk->logtid = log->logtid; in txBegin()
437 ++log->active; in txBegin()
462 struct jfs_log *log; in txBeginAnon() local
464 log = JFS_SBI(sb)->log; in txBeginAnon()
473 if (test_bit(log_SYNCBARRIER, &log->flag) || in txBeginAnon()
474 test_bit(log_QUIESCE, &log->flag)) { in txBeginAnon()
476 TXN_SLEEP(&log->syncwait); in txBeginAnon()
503 struct jfs_log *log; in txEnd() local
514 log = JFS_SBI(tblk->sb)->log; in txEnd()
528 spin_lock_irq(&log->gclock); // LOGGC_LOCK in txEnd()
530 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txEnd()
547 if (--log->active == 0) { in txEnd()
548 clear_bit(log_FLUSH, &log->flag); in txEnd()
553 if (test_bit(log_SYNCBARRIER, &log->flag)) { in txEnd()
557 jfs_syncpt(log, 1); in txEnd()
559 jfs_info("log barrier off: 0x%x", log->lsn); in txEnd()
562 clear_bit(log_SYNCBARRIER, &log->flag); in txEnd()
565 TXN_WAKEUP(&log->syncwait); in txEnd()
914 struct jfs_log *log; in txUnlock() local
919 log = JFS_SBI(tblk->sb)->log; in txUnlock()
943 LOGSYNC_LOCK(log, flags); in txUnlock()
945 logdiff(difft, tblk->clsn, log); in txUnlock()
946 logdiff(diffp, mp->clsn, log); in txUnlock()
951 LOGSYNC_UNLOCK(log, flags); in txUnlock()
982 LOGSYNC_LOCK(log, flags); in txUnlock()
983 log->count--; in txUnlock()
985 LOGSYNC_UNLOCK(log, flags); in txUnlock()
1142 struct jfs_log *log; in txCommit() local
1168 log = JFS_SBI(sb)->log; in txCommit()
1169 cd.log = log; in txCommit()
1272 if ((rc = txLog(log, tblk, &cd))) in txCommit()
1311 lmLog(log, tblk, lrd, NULL); in txCommit()
1313 lmGroupCommit(log, tblk); in txCommit()
1381 static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd) in txLog() argument
1400 lrd->log.redopage.fileset = cpu_to_le32(JFS_IP(ip)->fileset); in txLog()
1401 lrd->log.redopage.inode = cpu_to_le32(ip->i_ino); in txLog()
1406 xtLog(log, tblk, lrd, tlck); in txLog()
1410 dtLog(log, tblk, lrd, tlck); in txLog()
1414 diLog(log, tblk, lrd, tlck, cd); in txLog()
1418 mapLog(log, tblk, lrd, tlck); in txLog()
1422 dataLog(log, tblk, lrd, tlck); in txLog()
1438 static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in diLog() argument
1449 lrd->log.redopage.type = cpu_to_le16(LOG_INODE); in diLog()
1450 lrd->log.redopage.l2linesize = cpu_to_le16(L2INODESLOTSIZE); in diLog()
1452 pxd = &lrd->log.redopage.pxd; in diLog()
1463 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in diLog()
1493 lrd->log.noredoinoext.iagnum = in diLog()
1495 lrd->log.noredoinoext.inoext_idx = in diLog()
1500 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in diLog()
1527 lrd->log.updatemap.type = in diLog()
1530 lrd->log.updatemap.type = in diLog()
1532 lrd->log.updatemap.nxd = cpu_to_le16(1); in diLog()
1533 lrd->log.updatemap.pxd = pxdlock->pxd; in diLog()
1535 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in diLog()
1551 static int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in dataLog() argument
1560 lrd->log.redopage.type = cpu_to_le16(LOG_DATA); in dataLog()
1561 lrd->log.redopage.l2linesize = cpu_to_le16(L2DATASLOTSIZE); in dataLog()
1563 pxd = &lrd->log.redopage.pxd; in dataLog()
1584 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dataLog()
1597 static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in dtLog() argument
1607 lrd->log.redopage.type = cpu_to_le16(LOG_DTREE); in dtLog()
1608 lrd->log.redopage.l2linesize = cpu_to_le16(L2DTSLOTSIZE); in dtLog()
1610 pxd = &lrd->log.redopage.pxd; in dtLog()
1613 lrd->log.redopage.type |= cpu_to_le16(LOG_BTROOT); in dtLog()
1628 lrd->log.redopage.type |= cpu_to_le16(LOG_EXTEND); in dtLog()
1630 lrd->log.redopage.type |= cpu_to_le16(LOG_NEW); in dtLog()
1634 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dtLog()
1663 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dtLog()
1685 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in dtLog()
1700 static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in xtLog() argument
1717 lrd->log.redopage.type = cpu_to_le16(LOG_XTREE); in xtLog()
1718 lrd->log.redopage.l2linesize = cpu_to_le16(L2XTSLOTSIZE); in xtLog()
1720 page_pxd = &lrd->log.redopage.pxd; in xtLog()
1723 lrd->log.redopage.type |= cpu_to_le16(LOG_BTROOT); in xtLog()
1726 lrd->log.redopage.type |= in xtLog()
1753 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1844 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in xtLog()
1850 cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1859 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEXADLIST); in xtLog()
1862 lrd->log.updatemap.nxd = in xtLog()
1868 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1964 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1978 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEPXD); in xtLog()
1979 lrd->log.updatemap.nxd = cpu_to_le16(1); in xtLog()
1980 lrd->log.updatemap.pxd = pxdlock->pxd; in xtLog()
1983 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in xtLog()
1995 lrd->log.updatemap.type = in xtLog()
1999 lrd->log.updatemap.nxd = in xtLog()
2006 cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
2086 static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in mapLog() argument
2106 pxd = &lrd->log.redopage.pxd; in mapLog()
2108 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2121 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEPXD); in mapLog()
2122 lrd->log.updatemap.nxd = cpu_to_le16(1); in mapLog()
2123 lrd->log.updatemap.pxd = pxdlock->pxd; in mapLog()
2124 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2148 lrd->log.updatemap.type = in mapLog()
2151 lrd->log.updatemap.type = in mapLog()
2153 lrd->log.updatemap.nxd = cpu_to_le16(1); in mapLog()
2154 lrd->log.updatemap.pxd = pxdlock->pxd; in mapLog()
2156 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2701 struct jfs_log *log; in txLazyCommit() local
2715 log = (struct jfs_log *) JFS_SBI(tblk->sb)->log; in txLazyCommit()
2717 spin_lock_irq(&log->gclock); // LOGGC_LOCK in txLazyCommit()
2722 log->gcrtc--; in txLazyCommit()
2730 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txLazyCommit()
2735 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txLazyCommit()
2842 struct jfs_log *log = mp->log; in LogSyncRelease() local
2845 assert(log); in LogSyncRelease()
2863 struct jfs_log *log = JFS_SBI(sb)->log; in txQuiesce() local
2866 set_bit(log_QUIESCE, &log->flag); in txQuiesce()
2908 jfs_flush_journal(log, 0); in txQuiesce()
2918 struct jfs_log *log = JFS_SBI(sb)->log; in txResume() local
2920 clear_bit(log_QUIESCE, &log->flag); in txResume()
2921 TXN_WAKEUP(&log->syncwait); in txResume()