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

Function abd_alloc_struct

freebsd/contrib/openzfs/module/os/linux/zfs/abd_os.c:187–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187abd_t *
188abd_alloc_struct(size_t size)
189{
190 /*
191 * In Linux we do not use the size passed in during ABD
192 * allocation, so we just ignore it.
193 */
194 abd_t *abd = kmem_cache_alloc(abd_cache, KM_PUSHPAGE);
195 ASSERT3P(abd, !=, NULL);
196 list_link_init(&abd->abd_gang_link);
197 mutex_init(&abd->abd_mtx, NULL, MUTEX_DEFAULT, NULL);
198 ABDSTAT_INCR(abdstat_struct_size, sizeof (abd_t));
199
200 return (abd);
201}
202
203void
204abd_free_struct(abd_t *abd)

Callers 7

abd_alloc_zero_scatterFunction · 0.70
abd_get_offset_scatterFunction · 0.70
abd_allocFunction · 0.50
abd_alloc_linearFunction · 0.50
abd_alloc_gang_abdFunction · 0.50
abd_get_offset_implFunction · 0.50
abd_get_from_bufFunction · 0.50

Calls 3

kmem_cache_allocFunction · 0.85
list_link_initFunction · 0.50
mutex_initFunction · 0.50

Tested by

no test coverage detected