Whamcloud - gitweb
LU-10092 llite: Add persistent cache on client
[fs/lustre-release.git] / lustre / llite / super25.c
index bd38776..a6fef2e 100644 (file)
@@ -121,6 +121,12 @@ static int __init lustre_init(void)
        if (ll_file_data_slab == NULL)
                GOTO(out_cache, rc = -ENOMEM);
 
+       pcc_inode_slab = kmem_cache_create("ll_pcc_inode",
+                                          sizeof(struct pcc_inode), 0,
+                                          SLAB_HWCACHE_ALIGN, NULL);
+       if (pcc_inode_slab == NULL)
+               GOTO(out_cache, rc = -ENOMEM);
+
        rc = llite_tunables_register();
        if (rc)
                GOTO(out_cache, rc);
@@ -163,6 +169,7 @@ out_tunables:
 out_cache:
        kmem_cache_destroy(ll_inode_cachep);
        kmem_cache_destroy(ll_file_data_slab);
+       kmem_cache_destroy(pcc_inode_slab);
        return rc;
 }
 
@@ -179,6 +186,7 @@ static void __exit lustre_exit(void)
 
        kmem_cache_destroy(ll_inode_cachep);
        kmem_cache_destroy(ll_file_data_slab);
+       kmem_cache_destroy(pcc_inode_slab);
 }
 
 MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>");