Lines Matching refs:pbp
810 struct bio *nbp, *cbp, *pbp; in g_journal_insert() local
818 pbp = NULL; in g_journal_insert()
848 if (pbp == NULL) in g_journal_insert()
851 pbp->bio_next = nbp; in g_journal_insert()
855 pbp); in g_journal_insert()
970 if (pbp == NULL) in g_journal_insert()
973 pbp->bio_next = nbp; in g_journal_insert()
994 pbp = cbp; in g_journal_insert()
997 if (pbp == NULL) in g_journal_insert()
1000 pbp->bio_next = nbp; in g_journal_insert()
1003 GJ_DEBUG(3, "INSERT(%p): 8 (nbp=%p pbp=%p)", *head, nbp, pbp); in g_journal_insert()
1026 struct bio *cbp, *pbp; in g_journal_optimize() local
1030 pbp = NULL; in g_journal_optimize()
1034 pbp = NULL; in g_journal_optimize()
1038 if (pbp == NULL) { in g_journal_optimize()
1039 pbp = cbp; in g_journal_optimize()
1043 if (pbp->bio_offset + pbp->bio_length != cbp->bio_offset) { in g_journal_optimize()
1045 KASSERT(pbp->bio_offset + pbp->bio_length < cbp->bio_offset, in g_journal_optimize()
1047 (intmax_t)pbp->bio_offset, in g_journal_optimize()
1048 (intmax_t)pbp->bio_length, in g_journal_optimize()
1050 pbp = cbp; in g_journal_optimize()
1054 if (pbp->bio_length + cbp->bio_length > maxphys) { in g_journal_optimize()
1055 pbp = cbp; in g_journal_optimize()
1059 GJ_LOGREQ(4, pbp, "Join: "); in g_journal_optimize()
1061 pbp->bio_data = gj_realloc(pbp->bio_data, in g_journal_optimize()
1062 pbp->bio_length + cbp->bio_length, pbp->bio_length); in g_journal_optimize()
1063 bcopy(cbp->bio_data, pbp->bio_data + pbp->bio_length, in g_journal_optimize()
1066 pbp->bio_length += cbp->bio_length; in g_journal_optimize()
1067 pbp->bio_next = cbp->bio_next; in g_journal_optimize()
1069 cbp = pbp; in g_journal_optimize()
1072 GJ_LOGREQ(4, pbp, "Got: "); in g_journal_optimize()
1174 struct bio *pbp; in g_journal_copy_read_done() local
1180 pbp = bp->bio_parent; in g_journal_copy_read_done()
1189 g_destroy_bio(pbp); in g_journal_copy_read_done()
1194 pbp->bio_data = bp->bio_data; in g_journal_copy_read_done()
1196 g_io_request(pbp, cp); in g_journal_copy_read_done()
1246 struct bio *bp, *fbp, *pbp; in g_journal_flush() local
1271 GJQ_LAST(sc->sc_flush_queue, pbp); in g_journal_flush()
1281 GJQ_INSERT_AFTER(sc->sc_flush_queue, fbp, pbp); in g_journal_flush()
1282 pbp = fbp; in g_journal_flush()
1316 GJQ_INSERT_AFTER(sc->sc_flush_queue, bp, pbp); in g_journal_flush()
1317 pbp = bp; in g_journal_flush()
1483 g_journal_read_find(struct bio *head, int sorted, struct bio *pbp, off_t ostart, in g_journal_read_find() argument
1509 pbp->bio_data + cstart - pbp->bio_offset, cend - cstart); in g_journal_read_find()
1510 pbp->bio_completed += cend - cstart; in g_journal_read_find()
1511 if (pbp->bio_completed == pbp->bio_length) { in g_journal_read_find()
1516 g_io_deliver(pbp, 0); in g_journal_read_find()
1517 return (pbp); in g_journal_read_find()
1534 g_journal_read(struct g_journal_softc *sc, struct bio *pbp, off_t ostart, in g_journal_read() argument
1572 bp = g_journal_read_find(head, sorted, pbp, ostart, oend); in g_journal_read()
1573 if (bp == pbp) { /* Got the whole request. */ in g_journal_read()
1586 nbp = g_duplicate_bio(pbp); in g_journal_read()
1589 pbp->bio_data + cstart - pbp->bio_offset; in g_journal_read()
1601 g_journal_read(sc, pbp, ostart, cstart); in g_journal_read()
1603 g_journal_read(sc, pbp, cend, oend); in g_journal_read()
1610 nbp = g_duplicate_bio(pbp); in g_journal_read()
1612 nbp->bio_data = pbp->bio_data + ostart - pbp->bio_offset; in g_journal_read()
1630 struct bio *pbp; in g_journal_read_done() local
1635 pbp = bp->bio_parent; in g_journal_read_done()
1636 pbp->bio_inbed++; in g_journal_read_done()
1637 pbp->bio_completed += bp->bio_length; in g_journal_read_done()
1640 if (pbp->bio_error == 0) in g_journal_read_done()
1641 pbp->bio_error = bp->bio_error; in g_journal_read_done()
1646 if (pbp->bio_children == pbp->bio_inbed && in g_journal_read_done()
1647 pbp->bio_completed == pbp->bio_length) { in g_journal_read_done()
1649 g_io_deliver(pbp, 0); in g_journal_read_done()