Lines Matching full:chunk
80 struct objset_dnode_chunk *chunk; in objset_alloc() local
92 chunk = ecalloc(1, sizeof(*chunk)); in objset_alloc()
93 chunk->nextfree = 1; in objset_alloc()
94 STAILQ_INSERT_HEAD(&os->dnodechunks, chunk, next); in objset_alloc()
114 struct objset_dnode_chunk *chunk, *tmp; in _objset_write() local
122 STAILQ_FOREACH_SAFE(chunk, &os->dnodechunks, next, tmp) { in _objset_write()
125 assert(chunk->nextfree > 0); in _objset_write()
126 assert(chunk->nextfree <= os->dnodecount); in _objset_write()
127 assert(chunk->nextfree <= DNODES_PER_CHUNK); in _objset_write()
129 for (i = 0; i < chunk->nextfree; i += DNODES_PER_BLOCK) { in _objset_write()
133 if (chunk->nextfree - i < DNODES_PER_BLOCK) in _objset_write()
134 fill = DNODES_PER_BLOCK - (chunk->nextfree - i); in _objset_write()
140 0, fill, chunk->buf + i, DNODE_BLOCK_SIZE, loc, bp); in _objset_write()
145 free(chunk); in _objset_write()
198 struct objset_dnode_chunk *chunk; in objset_dnode_bonus_alloc() local
204 chunk = STAILQ_LAST(&os->dnodechunks, objset_dnode_chunk, next); in objset_dnode_bonus_alloc()
205 if (chunk->nextfree == DNODES_PER_CHUNK) { in objset_dnode_bonus_alloc()
206 chunk = ecalloc(1, sizeof(*chunk)); in objset_dnode_bonus_alloc()
207 STAILQ_INSERT_TAIL(&os->dnodechunks, chunk, next); in objset_dnode_bonus_alloc()
210 dnode = &chunk->buf[chunk->nextfree++]; in objset_dnode_bonus_alloc()
229 struct objset_dnode_chunk *chunk; in objset_dnode_lookup() local
234 STAILQ_FOREACH(chunk, &os->dnodechunks, next) { in objset_dnode_lookup()
236 return (&chunk->buf[id]); in objset_dnode_lookup()