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

Function zfs_kmod_init

freebsd/contrib/openzfs/module/zfs/zfs_ioctl.c:7618–7649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7616}
7617
7618int
7619zfs_kmod_init(void)
7620{
7621 int error;
7622
7623 if ((error = zvol_init()) != 0)
7624 return (error);
7625
7626 spa_init(SPA_MODE_READ | SPA_MODE_WRITE);
7627 zfs_init();
7628
7629 zfs_ioctl_init();
7630
7631 mutex_init(&zfsdev_state_lock, NULL, MUTEX_DEFAULT, NULL);
7632 zfsdev_state_list = kmem_zalloc(sizeof (zfsdev_state_t), KM_SLEEP);
7633 zfsdev_state_list->zs_minor = -1;
7634
7635 if ((error = zfsdev_attach()) != 0)
7636 goto out;
7637
7638 tsd_create(&zfs_fsyncer_key, NULL);
7639 tsd_create(&rrw_tsd_key, rrw_tsd_destroy);
7640 tsd_create(&zfs_allow_log_key, zfs_allow_log_destroy);
7641
7642 return (0);
7643out:
7644 zfs_fini();
7645 spa_fini();
7646 zvol_fini();
7647
7648 return (error);
7649}
7650
7651void
7652zfs_kmod_fini(void)

Callers 2

zfs__initFunction · 0.85
_initFunction · 0.85

Calls 10

spa_initFunction · 0.85
zfs_ioctl_initFunction · 0.85
tsd_createFunction · 0.85
spa_finiFunction · 0.85
zvol_initFunction · 0.50
zfs_initFunction · 0.50
mutex_initFunction · 0.50
zfsdev_attachFunction · 0.50
zfs_finiFunction · 0.50
zvol_finiFunction · 0.50

Tested by

no test coverage detected