Lines Matching refs:tblk
105 #define LOGGC_WAKEUP(tblk) wake_up_all(&(tblk)->gcwait) argument
176 static int lmWriteRecord(struct jfs_log * log, struct tblock * tblk,
238 int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in lmLog() argument
247 log, tblk, lrd, tlck); in lmLog()
252 if (tblk == NULL) in lmLog()
297 if (tblk->lsn == 0) { in lmLog()
299 tblk->lsn = mp->lsn; in lmLog()
303 list_add(&tblk->synclist, &mp->synclist); in lmLog()
311 logdiff(difft, tblk->lsn, log); in lmLog()
314 tblk->lsn = mp->lsn; in lmLog()
317 list_move(&tblk->synclist, &mp->synclist); in lmLog()
327 lsn = lmWriteRecord(log, tblk, lrd, tlck); in lmLog()
357 lmWriteRecord(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, in lmWriteRecord() argument
513 tblk->clsn = lsn; in lmWriteRecord()
514 jfs_info("wr: tclsn:0x%x, beor:0x%x", tblk->clsn, in lmWriteRecord()
530 tblk->flag = tblkGC_QUEUE; in lmWriteRecord()
531 tblk->bp = log->bp; in lmWriteRecord()
532 tblk->pn = log->page; in lmWriteRecord()
533 tblk->eor = log->eor; in lmWriteRecord()
536 list_add_tail(&tblk->cqueue, &log->cqueue); in lmWriteRecord()
580 struct tblock *tblk; in lmNextPage() local
595 tblk = NULL; in lmNextPage()
597 tblk = list_entry(log->cqueue.prev, struct tblock, cqueue); in lmNextPage()
609 if (tblk && tblk->pn == pn) { in lmNextPage()
611 tblk->flag |= tblkGC_EOP; in lmNextPage()
679 int lmGroupCommit(struct jfs_log * log, struct tblock * tblk) in lmGroupCommit() argument
686 if (tblk->flag & tblkGC_COMMITTED) { in lmGroupCommit()
687 if (tblk->flag & tblkGC_ERROR) in lmGroupCommit()
693 jfs_info("lmGroup Commit: tblk = 0x%p, gcrtc = %d", tblk, log->gcrtc); in lmGroupCommit()
695 if (tblk->xflag & COMMIT_LAZY) in lmGroupCommit()
696 tblk->flag |= tblkGC_LAZY; in lmGroupCommit()
699 (!(tblk->xflag & COMMIT_LAZY) || test_bit(log_FLUSH, &log->flag) in lmGroupCommit()
711 if (tblk->xflag & COMMIT_LAZY) { in lmGroupCommit()
721 if (tblk->flag & tblkGC_COMMITTED) { in lmGroupCommit()
722 if (tblk->flag & tblkGC_ERROR) in lmGroupCommit()
732 tblk->flag |= tblkGC_READY; in lmGroupCommit()
734 __SLEEP_COND(tblk->gcwait, (tblk->flag & tblkGC_COMMITTED), in lmGroupCommit()
738 if (tblk->flag & tblkGC_ERROR) in lmGroupCommit()
763 struct tblock *tblk; in lmGCwrite() local
775 list_for_each_entry(tblk, &log->cqueue, cqueue) { in lmGCwrite()
776 if (tblk->pn != gcpn) in lmGCwrite()
779 xtblk = tblk; in lmGCwrite()
782 tblk->flag |= tblkGC_COMMIT; in lmGCwrite()
784 tblk = xtblk; /* last tblk of the page */ in lmGCwrite()
789 bp = (struct lbuf *) tblk->bp; in lmGCwrite()
792 if (tblk->flag & tblkGC_EOP) { in lmGCwrite()
794 tblk->flag &= ~tblkGC_EOP; in lmGCwrite()
795 tblk->flag |= tblkGC_FREE; in lmGCwrite()
804 bp->l_ceor = tblk->eor; /* ? bp->l_ceor = bp->l_eor; */ in lmGCwrite()
828 struct tblock *tblk, *temp; in lmPostGC() local
838 list_for_each_entry_safe(tblk, temp, &log->cqueue, cqueue) { in lmPostGC()
839 if (!(tblk->flag & tblkGC_COMMIT)) in lmPostGC()
847 tblk->flag |= tblkGC_ERROR; in lmPostGC()
850 list_del(&tblk->cqueue); in lmPostGC()
851 tblk->flag &= ~tblkGC_QUEUE; in lmPostGC()
853 if (tblk == log->flush_tblk) { in lmPostGC()
859 jfs_info("lmPostGC: tblk = 0x%p, flag = 0x%x", tblk, in lmPostGC()
860 tblk->flag); in lmPostGC()
862 if (!(tblk->xflag & COMMIT_FORCE)) in lmPostGC()
866 txLazyUnlock(tblk); in lmPostGC()
869 tblk->flag |= tblkGC_COMMITTED; in lmPostGC()
871 if (tblk->flag & tblkGC_READY) in lmPostGC()
874 LOGGC_WAKEUP(tblk); in lmPostGC()
880 if (tblk->flag & tblkGC_FREE) in lmPostGC()
885 else if (tblk->flag & tblkGC_EOP) { in lmPostGC()
905 ((log->gcrtc > 0) || (tblk->bp->l_wqnext != NULL) || in lmPostGC()