Update the kstat dataset_name when renaming a zvol
[zfs.git] / config / kernel-kmem-cache.m4
blob0e9fe9eb2a908aec8c72e6c1f668fe2547050517
1 dnl #
2 dnl # grsecurity API change,
3 dnl # kmem_cache_create() with SLAB_USERCOPY flag replaced by
4 dnl # kmem_cache_create_usercopy().
5 dnl #
6 AC_DEFUN([ZFS_AC_KERNEL_SRC_KMEM_CACHE_CREATE_USERCOPY], [
7         ZFS_LINUX_TEST_SRC([kmem_cache_create_usercopy], [
8                 #include <linux/slab.h>
9                 static void ctor(void *foo) { /* fake ctor */ }
10         ],[
11                 struct kmem_cache *skc_linux_cache;
12                 const char *name = "test";
13                 size_t size = 4096;
14                 size_t align = 8;
15                 unsigned long flags = 0;
16                 size_t useroffset = 0;
17                 size_t usersize = size - useroffset;
19                 skc_linux_cache = kmem_cache_create_usercopy(
20                     name, size, align, flags, useroffset, usersize, ctor);
21         ])
24 AC_DEFUN([ZFS_AC_KERNEL_KMEM_CACHE_CREATE_USERCOPY], [
25         AC_MSG_CHECKING([whether kmem_cache_create_usercopy() exists])
26         ZFS_LINUX_TEST_RESULT([kmem_cache_create_usercopy], [
27                 AC_MSG_RESULT(yes)
28                 AC_DEFINE(HAVE_KMEM_CACHE_CREATE_USERCOPY, 1,
29                     [kmem_cache_create_usercopy() exists])
30         ],[
31                 AC_MSG_RESULT(no)
32         ])
35 AC_DEFUN([ZFS_AC_KERNEL_SRC_KMEM_CACHE], [
36         ZFS_AC_KERNEL_SRC_KMEM_CACHE_CREATE_USERCOPY
39 AC_DEFUN([ZFS_AC_KERNEL_KMEM_CACHE], [
40         ZFS_AC_KERNEL_KMEM_CACHE_CREATE_USERCOPY