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

Function zio_data_buf_alloc

freebsd/contrib/openzfs/module/zfs/zio.c:340–348  ·  view source on GitHub ↗

* Use zio_data_buf_alloc to allocate data. The data will not appear in a * crashdump if the kernel panics. This exists so that we will limit the amount * of ZFS data that shows up in a kernel crashdump. (Thus reducing the amount * of kernel heap dumped to disk when the kernel panics) */

Source from the content-addressed store, hash-verified

338 * of kernel heap dumped to disk when the kernel panics)
339 */
340void *
341zio_data_buf_alloc(size_t size)
342{
343 size_t c = (size - 1) >> SPA_MINBLOCKSHIFT;
344
345 VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT);
346
347 return (kmem_cache_alloc(zio_data_buf_cache[c], KM_PUSHPAGE));
348}
349
350void
351zio_buf_free(void *buf, size_t size)

Callers 5

qat_compressFunction · 0.85
abd_alloc_linearFunction · 0.85
arc_get_data_bufFunction · 0.85
zil_itx_createFunction · 0.85

Calls 1

kmem_cache_allocFunction · 0.85

Tested by

no test coverage detected