void net_lundman_zfs_zvol::stop (IOService *provider) { /* Stop being told about devices leaving */ if (disk_remove_notifier) disk_remove_notifier->remove(); #if 0 // You can not stop unload :( if (zfs_active_fs_count != 0 || spa_busy() || zvol_busy()) { IOLog("ZFS: Can not unload as we have filesystems mounted.\n"); return; } #endif IOLog("ZFS: Attempting to unload ...\n"); super::stop(provider); system_taskq_fini(); zfs_ioctl_osx_fini(); zvol_fini(); zfs_vfsops_fini(); sysctl_unregister_oid(&sysctl__zfs_kext_version); sysctl_unregister_oid(&sysctl__zfs); IOLog("ZFS: Unloaded module\n"); }
void net_lundman_zfs_zvol::stop (IOService *provider) { #if 0 // You can not stop unload :( if (zfs_active_fs_count != 0 || spa_busy() || zvol_busy()) { IOLog("ZFS: Can not unload as we have filesystems mounted.\n"); return; } #endif IOLog("ZFS: Attempting to unload ...\n"); super::stop(provider); system_taskq_fini(); zfs_ioctl_osx_fini(); zvol_fini(); zfs_vfsops_fini(); //sysctl_unregister_oid(&sysctl__debug_maczfs_stalk); // sysctl_unregister_oid(&sysctl__debug_maczfs); IOLog("ZFS: Unloaded module\n"); }
int zfs_module_stop(__unused kmod_info_t *ki, __unused void *data) { if (zfs_active_fs_count != 0 || spa_busy() || zvol_busy() || vfs_fsremove(zfs_vfsconf) != 0) { return KERN_FAILURE; /* ZFS Still busy! */ } zfs_fini(); printf("zfs_module_stop: memory footprint %d (kalloc %d, kernel %d)\n", zfs_footprint.current, zfs_kallocmap_size, zfs_kernelmap_size); return KERN_SUCCESS; }