STATIC struct quotactl_ops linvfs_qops;
STATIC struct super_operations linvfs_sops;
STATIC struct export_operations linvfs_export_ops;
-STATIC kmem_zone_t *linvfs_inode_zone;
-STATIC kmem_shaker_t xfs_inode_shaker;
+STATIC kmem_cache_t * linvfs_inode_cachep;
STATIC struct xfs_mount_args *
xfs_args_allocate(
{
vnode_t *vp;
- vp = (vnode_t *)kmem_cache_alloc(linvfs_inode_zone,
+ vp = (vnode_t *)kmem_cache_alloc(linvfs_inode_cachep,
kmem_flags_convert(KM_SLEEP));
if (!vp)
return NULL;
linvfs_destroy_inode(
struct inode *inode)
{
- kmem_cache_free(linvfs_inode_zone, LINVFS_GET_VP(inode));
-}
-
-int
-xfs_inode_shake(
- int priority,
- unsigned int gfp_mask)
-{
- int pages;
-
-
- pages = kmem_zone_shrink(linvfs_inode_zone);
- pages += kmem_zone_shrink(xfs_inode_zone);
- return pages;
+ kmem_cache_free(linvfs_inode_cachep, LINVFS_GET_VP(inode));
}
STATIC void
STATIC int
init_inodecache( void )
{
- linvfs_inode_zone = kmem_cache_create("linvfs_icache",
+ linvfs_inode_cachep = kmem_cache_create("linvfs_icache",
sizeof(vnode_t), 0,
SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
init_once, NULL);
- if (linvfs_inode_zone == NULL)
+ if (linvfs_inode_cachep == NULL)
return -ENOMEM;
return 0;
}
STATIC void
destroy_inodecache( void )
{
- if (kmem_cache_destroy(linvfs_inode_zone))
+ if (kmem_cache_destroy(linvfs_inode_cachep))
printk(KERN_WARNING "%s: cache still in use!\n", __FUNCTION__);
}
vn_init();
xfs_init();
uuid_init();
+ vfs_initdmapi();
vfs_initquota();
- xfs_inode_shaker = kmem_shake_register(xfs_inode_shake);
- if (!xfs_inode_shaker) {
- error = -ENOMEM;
- goto undo_shaker;
- }
-
error = register_filesystem(&xfs_fs_type);
if (error)
goto undo_register;
- XFS_DM_INIT(&xfs_fs_type);
return 0;
undo_register:
- kmem_shake_deregister(xfs_inode_shaker);
-
-undo_shaker:
pagebuf_terminate();
undo_pagebuf:
exit_xfs_fs( void )
{
vfs_exitquota();
- XFS_DM_EXIT(&xfs_fs_type);
+ vfs_exitdmapi();
unregister_filesystem(&xfs_fs_type);
- kmem_shake_deregister(xfs_inode_shaker);
xfs_cleanup();
pagebuf_terminate();
destroy_inodecache();