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

Function zap_leaf_transfer_array

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

Source from the content-addressed store, hash-verified

712}
713
714static uint16_t
715zap_leaf_transfer_array(zap_leaf_t *l, uint16_t chunk, zap_leaf_t *nl)
716{
717 uint16_t new_chunk;
718 uint16_t *nchunkp = &new_chunk;
719
720 while (chunk != CHAIN_END) {
721 uint16_t nchunk = zap_leaf_chunk_alloc(nl);
722 struct zap_leaf_array *nla =
723 &ZAP_LEAF_CHUNK(nl, nchunk).l_array;
724 struct zap_leaf_array *la =
725 &ZAP_LEAF_CHUNK(l, chunk).l_array;
726 int nextchunk = la->la_next;
727
728 ASSERT3U(chunk, <, ZAP_LEAF_NUMCHUNKS(l));
729 ASSERT3U(nchunk, <, ZAP_LEAF_NUMCHUNKS(l));
730
731 *nla = *la; /* structure assignment */
732
733 zap_leaf_chunk_free(l, chunk);
734 chunk = nextchunk;
735 *nchunkp = nchunk;
736 nchunkp = &nla->la_next;
737 }
738 *nchunkp = CHAIN_END;
739 return (new_chunk);
740}
741
742static void
743zap_leaf_transfer_entry(zap_leaf_t *l, int entry, zap_leaf_t *nl)

Callers 1

zap_leaf_transfer_entryFunction · 0.85

Calls 2

zap_leaf_chunk_allocFunction · 0.85
zap_leaf_chunk_freeFunction · 0.85

Tested by

no test coverage detected