Lines Matching defs:bounce
572 struct cdbounce *bounce = bp->b_private;
573 struct buf *obp = bounce->obp;
575 if (bp == bounce->lbp) {
576 if ((bounce->lerr = bp->b_error) == 0)
577 memcpy(obp->b_data, (char *)bp->b_data + bounce->head, bounce->lcount);
578 bounce->lbp = NULL;
581 if (bp == bounce->rbp) {
582 if ((bounce->rerr = bp->b_error) == 0)
583 memcpy((char *)obp->b_data + bounce->lcount, bp->b_data, bounce->rcount);
584 bounce->rbp = NULL;
590 if (bounce->lbp != NULL || bounce->rbp != NULL)
593 obp->b_error = bounce->rerr;
594 if (bounce->lerr)
595 obp->b_error = bounce->lerr;
601 free(bounce, M_DEVBUF);
624 /* Set up the IOP to the bounce buffer */
648 struct cdbounce *bounce;
654 bounce = malloc(sizeof(struct cdbounce), M_DEVBUF, M_NOWAIT|M_ZERO);
655 if (bounce == NULL)
669 bounce->head = skip * DEV_BSIZE;
670 bounce->lcount = imin(count - bounce->head, bp->b_bcount);
671 bounce->rcount = bp->b_bcount - bounce->lcount;
673 error = cd_make_bounce_buffer(cd, bp, blkno, count, &lbp, bounce);
681 error = cd_make_bounce_buffer(cd, bp, blkno, count, &rbp, bounce);
690 bounce->obp = bp;
691 bounce->lbp = lbp;
692 bounce->rbp = rbp;
694 *bouncep = bounce;
699 free(bounce, M_DEVBUF);
733 * If label and device don't agree in sector size use a bounce buffer
736 struct cdbounce *bounce = NULL;
738 error = cd_make_bounce(cd, bp, &bounce);
742 dk_strategy(dksc, bounce->lbp);
743 if (bounce->rbp != NULL)
744 dk_strategy(dksc, bounce->rbp);