Lines Matching defs:cbp
260 struct bio *bp, *cbp, *cbp2;
290 cbp = bp->bio_driver1;
292 g_destroy_bio(cbp);
298 cbp = bp->bio_driver1;
300 cbp->bio_to = cp->provider;
301 cbp->bio_done = g_eli_write_done;
308 cbp->bio_length = cp->provider->sectorsize * nsec;
309 cbp->bio_offset = (bp->bio_offset / bp->bio_to->sectorsize) * sc->sc_bytes_per_sector;
310 cbp->bio_data = bp->bio_driver2;
317 if (cbp->bio_length > MAXPHYS) {
319 cbp2->bio_length = cbp->bio_length - MAXPHYS;
320 cbp2->bio_data = cbp->bio_data + MAXPHYS;
321 cbp2->bio_offset = cbp->bio_offset + MAXPHYS;
324 cbp->bio_length = MAXPHYS;
329 G_ELI_LOGREQ(2, cbp, "Sending request.");
332 g_io_request(cbp, cp);
344 struct bio *cbp, *cbp2;
351 cbp = bp->bio_driver1;
353 cbp->bio_to = cp->provider;
354 cbp->bio_done = g_eli_read_done;
361 cbp->bio_length = cp->provider->sectorsize * nsec;
362 size = cbp->bio_length;
367 cbp->bio_offset = (bp->bio_offset / bp->bio_to->sectorsize) * sc->sc_bytes_per_sector;
369 cbp->bio_data = bp->bio_driver2;
376 if (cbp->bio_length > MAXPHYS) {
378 cbp2->bio_length = cbp->bio_length - MAXPHYS;
379 cbp2->bio_data = cbp->bio_data + MAXPHYS;
380 cbp2->bio_offset = cbp->bio_offset + MAXPHYS;
383 cbp->bio_length = MAXPHYS;
388 G_ELI_LOGREQ(2, cbp, "Sending request.");
389 g_io_request(cbp, cp);