Lines Matching refs:blk
187 write_strategy(void *devdata, int rw, daddr_t blk, size_t size, in write_strategy() argument
198 bcache_invalidate(bc, blk + i); in write_strategy()
202 return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); in write_strategy()
211 read_strategy(void *devdata, int rw, daddr_t blk, size_t size, in read_strategy() argument
237 if (BCACHE_LOOKUP(bc, (daddr_t)(blk + i))) { in read_strategy()
262 if (blk == bc->bcache_nextblkno) { in read_strategy()
270 bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)), buf, size); in read_strategy()
279 p_blk = blk + i; in read_strategy()
318 if ((bc->bcache_nextblkno != blk) && ra != 0) { in read_strategy()
365 if (BCACHE_LOOKUP(bc, (daddr_t)(blk + i))) in read_strategy()
373 bcopy(bc->bcache_data + (bcache_blksize * BHASH(bc, blk)), buf, size); in read_strategy()
381 bc->bcache_nextblkno = blk + (size / DEV_BSIZE); in read_strategy()
391 bcache_strategy(void *devdata, int rw, daddr_t blk, size_t size, in bcache_strategy() argument
408 DPRINTF("bypass %zu from %jd", size / bcache_blksize, blk); in bcache_strategy()
411 return (dd->dv_strategy(dd->dv_devdata, rw, blk, size, buf, rsize)); in bcache_strategy()
423 cblk = bcache_nblks - BHASH(bc, blk); /* # of blocks left */ in bcache_strategy()
431 ret = read_strategy(devdata, rw, blk, csize, buf+total, &isize); in bcache_strategy()
442 blk += isize / bcache_blksize; in bcache_strategy()
453 return write_strategy(devdata, F_WRITE, blk, size, buf, rsize); in bcache_strategy()