Lines Matching refs:bp
258 mdevstrategy(struct buf *bp) in mdevstrategy() argument
266 …devid = minor(buf_device(bp)); /* Get minor devic… in mdevstrategy()
269 buf_seterror(bp, ENXIO); in mdevstrategy()
270 buf_biodone(bp); in mdevstrategy()
274 …buf_setresid(bp, buf_count(bp)); /* Set byte count … in mdevstrategy()
276 blkoff = buf_blkno(bp) * mdev[devid].mdSecsize; /* Get offset into file */ in mdevstrategy()
285 …buf_seterror(bp, EINVAL); /* Yeah, this is an error … in mdevstrategy()
287 buf_biodone(bp); /* Return */ in mdevstrategy()
291 …if ((blkoff + buf_count(bp)) > (mdev[devid].mdSize << 12)) { /* Will this read go past … in mdevstrategy()
292 buf_setcount(bp, (uint32_t)((mdev[devid].mdSize << 12) - blkoff)); /* Yes, trim to max */ in mdevstrategy()
298 if (buf_map(bp, (caddr_t *)&vaddr)) { in mdevstrategy()
304 if (buf_flags(bp) & B_READ) { /* Is this a read? */ in mdevstrategy()
307 (void *)vaddr, (size_t)buf_count(bp)); /* This is virtual, just get the data */ in mdevstrategy()
309 … left = buf_count(bp); /* Init the amount left to copy */ in mdevstrategy()
330 (size_t)buf_count(bp)); /* This is virtual, just put the data */ in mdevstrategy()
332 … left = buf_count(bp); /* Init the amount left to copy */ in mdevstrategy()
357 buf_unmap(bp); in mdevstrategy()
359 …buf_setresid(bp, 0); /* Nothing… in mdevstrategy()
360 …buf_biodone(bp); /* Say we'… in mdevstrategy()