@@ -21,6 +21,7 @@
#include "xfs_sb.h"
#include "xfs_health.h"
+struct kmem_cache *xfs_log_vec_cache;
struct kmem_cache *xfs_log_ticket_cache;
/* Local miscellaneous function prototypes */
@@ -20,6 +20,8 @@ struct xfs_log_vec {
int lv_size; /* size of allocated lv */
};
+extern struct kmem_cache *xfs_log_vec_cache;
+
#define XFS_LOG_VEC_ORDERED (-1)
/*
@@ -2222,8 +2222,16 @@ xfs_init_caches(void)
if (!xfs_parent_args_cache)
goto out_destroy_xmi_cache;
+ xfs_log_vec_cache = kmem_cache_create("xfs_log_vec",
+ sizeof(struct xfs_log_vec),
+ 0, 0, NULL);
+ if (!xfs_log_vec_cache)
+ goto out_destroy_args_cache;
+
return 0;
+ out_destroy_args_cache:
+ kmem_cache_destroy(xfs_parent_args_cache);
out_destroy_xmi_cache:
kmem_cache_destroy(xfs_xmi_cache);
out_destroy_xmd_cache:
@@ -2286,6 +2294,7 @@ xfs_destroy_caches(void)
* destroy caches.
*/
rcu_barrier();
+ kmem_cache_destroy(xfs_log_vec_cache);
kmem_cache_destroy(xfs_parent_args_cache);
kmem_cache_destroy(xfs_xmd_cache);
kmem_cache_destroy(xfs_xmi_cache);