3 dnl # The super_block structure now stores a per-filesystem shrinker.
4 dnl # This interface is preferable because it can be used to specifically
5 dnl # target only the zfs filesystem for pruning.
7 AC_DEFUN([ZFS_AC_KERNEL_SHRINK], [
8 AC_MSG_CHECKING([whether super_block has s_shrink])
9 ZFS_LINUX_TRY_COMPILE([
12 int (*shrink)(struct shrinker *, struct shrink_control *sc)
13 __attribute__ ((unused)) = NULL;
14 struct super_block sb __attribute__ ((unused)) = {
15 .s_shrink.shrink = shrink,
16 .s_shrink.seeks = DEFAULT_SEEKS,
21 AC_DEFINE(HAVE_SHRINK, 1, [struct super_block has s_shrink])
28 AC_DEFUN([ZFS_AC_KERNEL_NR_CACHED_OBJECTS], [
29 AC_MSG_CHECKING([whether sops->nr_cached_objects() exists])
30 ZFS_LINUX_TRY_COMPILE([
33 int (*nr_cached_objects)(struct super_block *)
34 __attribute__ ((unused)) = NULL;
35 struct super_operations sops __attribute__ ((unused)) = {
36 .nr_cached_objects = nr_cached_objects,
40 AC_DEFINE(HAVE_NR_CACHED_OBJECTS, 1,
41 [sops->nr_cached_objects() exists])
47 AC_DEFUN([ZFS_AC_KERNEL_FREE_CACHED_OBJECTS], [
48 AC_MSG_CHECKING([whether sops->free_cached_objects() exists])
49 ZFS_LINUX_TRY_COMPILE([
52 void (*free_cached_objects)(struct super_block *, int)
53 __attribute__ ((unused)) = NULL;
54 struct super_operations sops __attribute__ ((unused)) = {
55 .free_cached_objects = free_cached_objects,
59 AC_DEFINE(HAVE_FREE_CACHED_OBJECTS, 1,
60 [sops->free_cached_objects() exists])