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

Function radix_to_skip

freebsd/kern/subr_blist.c:169–174  ·  view source on GitHub ↗

* For a subtree that can represent the state of up to 'radix' blocks, the * number of leaf nodes of the subtree is L=radix/BLIST_RADIX. If 'm' * is short for BLIST_RADIX, then for a tree of height h with L=m**h * leaf nodes, the total number of tree nodes is 1 + m + m**2 + ... + m**h, * or, equivalently, (m**(h+1)-1)/(m-1). This quantity is called 'skip' * in the 'meta' functions that proce

Source from the content-addressed store, hash-verified

167 * calculation.
168 */
169static inline daddr_t
170radix_to_skip(daddr_t radix)
171{
172
173 return (radix / BLIST_MASK);
174}
175
176/*
177 * Provide a mask with count bits set, starting as position n.

Callers 7

blist_statsFunction · 0.85
blst_next_leaf_allocFunction · 0.85
blst_meta_allocFunction · 0.85
blst_meta_freeFunction · 0.85
blst_copyFunction · 0.85
blst_meta_fillFunction · 0.85
blst_radix_printFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected