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

Function zstd_init

freebsd/contrib/openzfs/module/zstd/zfs_zstd.c:732–749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730}
731
732extern int __init
733zstd_init(void)
734{
735 /* Set pool size by using maximum sane thread count * 4 */
736 pool_count = (boot_ncpus * 4);
737 zstd_meminit();
738
739 /* Initialize kstat */
740 zstd_ksp = kstat_create("zfs", 0, "zstd", "misc",
741 KSTAT_TYPE_NAMED, sizeof (zstd_stats) / sizeof (kstat_named_t),
742 KSTAT_FLAG_VIRTUAL);
743 if (zstd_ksp != NULL) {
744 zstd_ksp->ks_data = &zstd_stats;
745 kstat_install(zstd_ksp);
746 }
747
748 return (0);
749}
750
751extern void __exit
752zstd_fini(void)

Callers 1

kernel_initFunction · 0.85

Calls 3

zstd_meminitFunction · 0.85
kstat_createFunction · 0.85
kstat_installFunction · 0.50

Tested by

no test coverage detected