Whamcloud - gitweb
LU-13134 obdclass: use slab allocation for cl_dio_aio
[fs/lustre-release.git] / lustre / obdclass / cl_object.c
index 7d14a6b..1e39da3 100644 (file)
@@ -48,7 +48,6 @@
 
 #include <linux/list.h>
 #include <libcfs/libcfs.h>
-/* class_put_type() */
 #include <obd_class.h>
 #include <obd_support.h>
 #include <lustre_fid.h>
@@ -58,6 +57,7 @@
 #include "cl_internal.h"
 
 static struct kmem_cache *cl_env_kmem;
+struct kmem_cache *cl_dio_aio_kmem;
 
 /** Lock class of cl_object_header::coh_attr_guard */
 static struct lock_class_key cl_attr_guard_class;
@@ -1047,14 +1047,19 @@ static struct lu_context_key cl_key = {
 };
 
 static struct lu_kmem_descr cl_object_caches[] = {
-        {
-                .ckd_cache = &cl_env_kmem,
-                .ckd_name  = "cl_env_kmem",
-                .ckd_size  = sizeof (struct cl_env)
-        },
-        {
-                .ckd_cache = NULL
-        }
+       {
+               .ckd_cache = &cl_env_kmem,
+               .ckd_name  = "cl_env_kmem",
+               .ckd_size  = sizeof(struct cl_env)
+       },
+       {
+               .ckd_cache = &cl_dio_aio_kmem,
+               .ckd_name  = "cl_dio_aio_kmem",
+               .ckd_size  = sizeof(struct cl_dio_aio)
+       },
+       {
+               .ckd_cache = NULL
+       }
 };
 
 /**