MCPcopy Create free account
hub / github.com/F-Stack/f-stack / zap_leaf_chunk_free

Function zap_leaf_chunk_free

freebsd/contrib/openzfs/module/zfs/zap_leaf.c:202–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202static void
203zap_leaf_chunk_free(zap_leaf_t *l, uint16_t chunk)
204{
205 struct zap_leaf_free *zlf = &ZAP_LEAF_CHUNK(l, chunk).l_free;
206 ASSERT3U(zap_leaf_phys(l)->l_hdr.lh_nfree, <, ZAP_LEAF_NUMCHUNKS(l));
207 ASSERT3U(chunk, <, ZAP_LEAF_NUMCHUNKS(l));
208 ASSERT(zlf->lf_type != ZAP_CHUNK_FREE);
209
210 zlf->lf_type = ZAP_CHUNK_FREE;
211 zlf->lf_next = zap_leaf_phys(l)->l_hdr.lh_freelist;
212 bzero(zlf->lf_pad, sizeof (zlf->lf_pad)); /* help it to compress */
213 zap_leaf_phys(l)->l_hdr.lh_freelist = chunk;
214
215 zap_leaf_phys(l)->l_hdr.lh_nfree++;
216}
217
218/*
219 * Routines which manipulate leaf arrays (zap_leaf_array type chunks).

Callers 4

zap_leaf_array_freeFunction · 0.85
zap_entry_removeFunction · 0.85
zap_leaf_transfer_arrayFunction · 0.85
zap_leaf_transfer_entryFunction · 0.85

Calls 2

bzeroFunction · 0.85
zap_leaf_physFunction · 0.50

Tested by

no test coverage detected