Lines Matching refs:bcep
52 verify_match(int fd, const struct mkuz_blk *cbp, struct mkuz_blkcache_itm *bcep) in verify_match() argument
63 if (lseek(fd, bcep->hit.offset, SEEK_SET) < 0) { in verify_match()
98 struct mkuz_blkcache_itm *bcep; in mkuz_blkcache_regblock() local
107 bcep = &blkcache.first[h]; in mkuz_blkcache_regblock()
109 for (bcep = &blkcache.first[h]; bcep != NULL; bcep = bcep->next) { in mkuz_blkcache_regblock()
110 if (bcep->hit.len != bp->info.len) in mkuz_blkcache_regblock()
112 if (memcmp(bp->info.digest, bcep->hit.digest, in mkuz_blkcache_regblock()
117 if (bcep != NULL) { in mkuz_blkcache_regblock()
118 rval = verify_match(fd, bp, bcep); in mkuz_blkcache_regblock()
122 I2J(bcep->hit.blkno), I2J(bcep->hit.offset), in mkuz_blkcache_regblock()
125 return (&bcep->hit); in mkuz_blkcache_regblock()
137 bcep = malloc(sizeof(struct mkuz_blkcache_itm)); in mkuz_blkcache_regblock()
138 if (bcep == NULL) in mkuz_blkcache_regblock()
140 memset(bcep, '\0', sizeof(struct mkuz_blkcache_itm)); in mkuz_blkcache_regblock()
141 bcep->next = blkcache.first[h].next; in mkuz_blkcache_regblock()
142 blkcache.first[h].next = bcep; in mkuz_blkcache_regblock()
144 bcep->hit = bp->info; in mkuz_blkcache_regblock()