Lines Matching refs:ip
240 struct indir *ip;
242 ip = malloc(sizeof *ip, M_MD, (md_malloc_wait ? M_WAITOK : M_NOWAIT)
244 if (ip == NULL)
246 ip->array = malloc(sizeof(uintptr_t) * NINDIR,
248 if (ip->array == NULL) {
249 free(ip, M_MD);
252 ip->total = NINDIR;
253 ip->shift = shift;
254 return (ip);
258 del_indir(struct indir *ip)
261 free(ip->array, M_MDSECT);
262 free(ip, M_MD);
266 destroy_indir(struct md_s *sc, struct indir *ip)
271 if (!ip->array[i])
273 if (ip->shift)
274 destroy_indir(sc, (struct indir*)(ip->array[i]));
275 else if (ip->array[i] > 255)
276 uma_zfree(sc->uma, (void *)(ip->array[i]));
278 del_indir(ip);
290 struct indir *ip;
302 * too much space for ip->array in here.
304 ip = malloc(sizeof *ip, M_MD, M_WAITOK | M_ZERO);
305 ip->array = malloc(sizeof(uintptr_t) * NINDIR,
307 ip->total = NINDIR;
308 ip->shift = layer * nshift;
309 return (ip);
317 s_read(struct indir *ip, off_t offset)
326 for (cip = ip; cip != NULL;) {
344 s_write(struct indir *ip, off_t offset, uintptr_t ptr)
354 cip = ip;
387 while (cip->used == 0 && cip != ip) {