Lines Matching defs:bp
70 static void mambodisk_strategy(struct bio *bp);
182 mambodisk_strategy(struct bio *bp)
186 sc = (struct mambodisk_softc *)bp->bio_disk->d_drv1;
188 bioq_disksort(&sc->bio_queue, bp);
197 struct bio *bp;
210 bp = bioq_first(&sc->bio_queue);
211 if (bp == NULL)
213 } while (bp == NULL && sc->running);
214 if (bp)
215 bioq_remove(&sc->bio_queue, bp);
220 end = bp->bio_pblkno + (bp->bio_bcount / sz);
221 for (block = bp->bio_pblkno; block < end;) {
223 char *vaddr = bp->bio_data +
224 (block - bp->bio_pblkno) * sz;
230 if (bp->bio_cmd == BIO_READ) {
233 } else if (bp->bio_cmd == BIO_WRITE) {
246 bp->bio_error = EIO;
247 bp->bio_resid = (end - block) * sz;
248 bp->bio_flags |= BIO_ERROR;
250 biodone(bp);