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()
370 if (!log) { in txBegin()
384 if (test_bit(log_SYNCBARRIER, &log->flag) || in txBegin()
385 test_bit(log_QUIESCE, &log->flag)) { in txBegin()
387 TXN_SLEEP(&log->syncwait); in txBegin()
439 ++log->logtid; in txBegin()
440 tblk->logtid = log->logtid; in txBegin()
442 ++log->active; in txBegin()
467 struct jfs_log *log; in txBeginAnon() local
469 log = JFS_SBI(sb)->log; in txBeginAnon()
478 if (test_bit(log_SYNCBARRIER, &log->flag) || in txBeginAnon()
479 test_bit(log_QUIESCE, &log->flag)) { in txBeginAnon()
481 TXN_SLEEP(&log->syncwait); in txBeginAnon()
508 struct jfs_log *log; in txEnd() local
519 log = JFS_SBI(tblk->sb)->log; in txEnd()
533 spin_lock_irq(&log->gclock); // LOGGC_LOCK in txEnd()
535 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txEnd()
552 if (--log->active == 0) { in txEnd()
553 clear_bit(log_FLUSH, &log->flag); in txEnd()
558 if (test_bit(log_SYNCBARRIER, &log->flag)) { in txEnd()
562 jfs_syncpt(log, 1); in txEnd()
564 jfs_info("log barrier off: 0x%x", log->lsn); in txEnd()
567 clear_bit(log_SYNCBARRIER, &log->flag); in txEnd()
570 TXN_WAKEUP(&log->syncwait); in txEnd()
919 struct jfs_log *log; in txUnlock() local
924 log = JFS_SBI(tblk->sb)->log; in txUnlock()
948 LOGSYNC_LOCK(log, flags); in txUnlock()
950 logdiff(difft, tblk->clsn, log); in txUnlock()
951 logdiff(diffp, mp->clsn, log); in txUnlock()
956 LOGSYNC_UNLOCK(log, flags); in txUnlock()
987 LOGSYNC_LOCK(log, flags); in txUnlock()
988 log->count--; in txUnlock()
990 LOGSYNC_UNLOCK(log, flags); in txUnlock()
1147 struct jfs_log *log; in txCommit() local
1173 log = JFS_SBI(sb)->log; in txCommit()
1174 cd.log = log; in txCommit()
1277 if ((rc = txLog(log, tblk, &cd))) in txCommit()
1316 lmLog(log, tblk, lrd, NULL); in txCommit()
1318 lmGroupCommit(log, tblk); in txCommit()
1386 static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd) in txLog() argument
1405 lrd->log.redopage.fileset = cpu_to_le32(JFS_IP(ip)->fileset); in txLog()
1406 lrd->log.redopage.inode = cpu_to_le32(ip->i_ino); in txLog()
1411 xtLog(log, tblk, lrd, tlck); in txLog()
1415 dtLog(log, tblk, lrd, tlck); in txLog()
1419 diLog(log, tblk, lrd, tlck, cd); in txLog()
1423 mapLog(log, tblk, lrd, tlck); in txLog()
1427 dataLog(log, tblk, lrd, tlck); in txLog()
1443 static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in diLog() argument
1454 lrd->log.redopage.type = cpu_to_le16(LOG_INODE); in diLog()
1455 lrd->log.redopage.l2linesize = cpu_to_le16(L2INODESLOTSIZE); in diLog()
1457 pxd = &lrd->log.redopage.pxd; in diLog()
1468 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in diLog()
1498 lrd->log.noredoinoext.iagnum = in diLog()
1500 lrd->log.noredoinoext.inoext_idx = in diLog()
1505 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in diLog()
1532 lrd->log.updatemap.type = in diLog()
1535 lrd->log.updatemap.type = in diLog()
1537 lrd->log.updatemap.nxd = cpu_to_le16(1); in diLog()
1538 lrd->log.updatemap.pxd = pxdlock->pxd; in diLog()
1540 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in diLog()
1556 static int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in dataLog() argument
1565 lrd->log.redopage.type = cpu_to_le16(LOG_DATA); in dataLog()
1566 lrd->log.redopage.l2linesize = cpu_to_le16(L2DATASLOTSIZE); in dataLog()
1568 pxd = &lrd->log.redopage.pxd; in dataLog()
1589 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dataLog()
1602 static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in dtLog() argument
1612 lrd->log.redopage.type = cpu_to_le16(LOG_DTREE); in dtLog()
1613 lrd->log.redopage.l2linesize = cpu_to_le16(L2DTSLOTSIZE); in dtLog()
1615 pxd = &lrd->log.redopage.pxd; in dtLog()
1618 lrd->log.redopage.type |= cpu_to_le16(LOG_BTROOT); in dtLog()
1633 lrd->log.redopage.type |= cpu_to_le16(LOG_EXTEND); in dtLog()
1635 lrd->log.redopage.type |= cpu_to_le16(LOG_NEW); in dtLog()
1639 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dtLog()
1668 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in dtLog()
1690 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in dtLog()
1705 static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in xtLog() argument
1722 lrd->log.redopage.type = cpu_to_le16(LOG_XTREE); in xtLog()
1723 lrd->log.redopage.l2linesize = cpu_to_le16(L2XTSLOTSIZE); in xtLog()
1725 page_pxd = &lrd->log.redopage.pxd; in xtLog()
1728 lrd->log.redopage.type |= cpu_to_le16(LOG_BTROOT); in xtLog()
1731 lrd->log.redopage.type |= in xtLog()
1758 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1849 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in xtLog()
1855 cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1864 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEXADLIST); in xtLog()
1867 lrd->log.updatemap.nxd = in xtLog()
1873 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1968 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
1982 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEPXD); in xtLog()
1983 lrd->log.updatemap.nxd = cpu_to_le16(1); in xtLog()
1984 lrd->log.updatemap.pxd = pxdlock->pxd; in xtLog()
1987 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in xtLog()
1999 lrd->log.updatemap.type = in xtLog()
2003 lrd->log.updatemap.nxd = in xtLog()
2010 cpu_to_le32(lmLog(log, tblk, lrd, tlck)); in xtLog()
2088 static void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in mapLog() argument
2108 pxd = &lrd->log.redopage.pxd; in mapLog()
2110 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2123 lrd->log.updatemap.type = cpu_to_le16(LOG_FREEPXD); in mapLog()
2124 lrd->log.updatemap.nxd = cpu_to_le16(1); in mapLog()
2125 lrd->log.updatemap.pxd = pxdlock->pxd; in mapLog()
2126 lrd->backchain = cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2150 lrd->log.updatemap.type = in mapLog()
2153 lrd->log.updatemap.type = in mapLog()
2155 lrd->log.updatemap.nxd = cpu_to_le16(1); in mapLog()
2156 lrd->log.updatemap.pxd = pxdlock->pxd; in mapLog()
2158 cpu_to_le32(lmLog(log, tblk, lrd, NULL)); in mapLog()
2702 struct jfs_log *log; in txLazyCommit() local
2716 log = (struct jfs_log *) JFS_SBI(tblk->sb)->log; in txLazyCommit()
2718 spin_lock_irq(&log->gclock); // LOGGC_LOCK in txLazyCommit()
2723 log->gcrtc--; in txLazyCommit()
2731 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txLazyCommit()
2736 spin_unlock_irq(&log->gclock); // LOGGC_UNLOCK in txLazyCommit()
2843 struct jfs_log *log = mp->log; in LogSyncRelease() local
2846 assert(log); in LogSyncRelease()
2864 struct jfs_log *log = JFS_SBI(sb)->log; in txQuiesce() local
2867 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()