Lines Matching defs:bp
648 shadow_read(struct vn_softc * vn, struct buf * bp, char * base,
658 offset = buf_blkno(bp);
659 resid = buf_resid(bp) / blocksize;
691 buf_setresid(bp, resid * blocksize);
696 shadow_write(struct vn_softc * vn, struct buf * bp, char * base,
706 offset = buf_blkno(bp);
707 resid = buf_resid(bp) / blocksize;
742 buf_setresid(bp, resid * blocksize);
747 vn_readwrite_io(struct vn_softc * vn, struct buf * bp, vfs_context_t ctx)
753 if (buf_map(bp, &vaddr))
761 buf_flags(bp) & B_READ ? UIO_READ : UIO_WRITE,
763 (off_t)buf_blkno(bp) * vn->sc_secsize,
764 buf_resid(bp), &temp_resid);
765 buf_setresid(bp, temp_resid);
768 if (buf_flags(bp) & B_READ)
769 error = shadow_read(vn, bp, iov_base, ctx);
771 error = shadow_write(vn, bp, iov_base, ctx);
773 buf_unmap(bp);
779 vnstrategy(struct buf *bp)
791 vn = vn_table + vnunit(buf_device(bp));
800 buf_setresid(bp, buf_count(bp));
805 blk_num = buf_blkno(bp);
806 if (buf_count(bp) % vn->sc_secsize != 0) {
810 sz = howmany(buf_count(bp), vn->sc_secsize);
826 buf_setcount(bp, (vn->sc_size - blk_num) * vn->sc_secsize);
827 buf_setresid(bp, buf_count(bp));
855 error = vn_readwrite_io(vn, bp, &context);
864 buf_seterror(bp, error);
866 buf_biodone(bp);