Lines Matching defs:bp
78 ofwd_startio(struct ofwd_softc *sc, struct bio *bp)
82 r = OF_seek(sc->ofwd_instance, bp->bio_offset);
84 switch (bp->bio_cmd) {
86 r = OF_read(sc->ofwd_instance, (void *)bp->bio_data,
87 bp->bio_length);
90 r = OF_write(sc->ofwd_instance, (void *)bp->bio_data,
91 bp->bio_length);
94 if (r != bp->bio_length)
97 bp->bio_resid = 0;
105 struct bio *bp;
113 bp = bioq_takefirst(&sc->ofwd_bio_queue);
114 if (!bp) {
120 if (bp->bio_cmd == BIO_GETATTR) {
123 error = ofwd_startio(sc, bp);
126 bp->bio_completed = bp->bio_length;
127 g_io_deliver(bp, error);
188 g_ofwd_start(struct bio *bp)
192 sc = bp->bio_to->geom->softc;
194 bioq_disksort(&sc->ofwd_bio_queue, bp);