xref: /freebsd/sys/contrib/openzfs/config/kernel-discard-granularity.m4 (revision fe75646a0234a261c0013bf1840fdac4acaf0cec)
1dnl #
2dnl # 2.6.33 API change
3dnl # Discard granularity and alignment restrictions may now be set.
4dnl #
5AC_DEFUN([ZFS_AC_KERNEL_SRC_DISCARD_GRANULARITY], [
6	ZFS_LINUX_TEST_SRC([discard_granularity], [
7		#include <linux/blkdev.h>
8	],[
9		struct queue_limits ql __attribute__ ((unused));
10		ql.discard_granularity = 0;
11	])
12])
13
14AC_DEFUN([ZFS_AC_KERNEL_DISCARD_GRANULARITY], [
15	AC_MSG_CHECKING([whether ql->discard_granularity is available])
16	ZFS_LINUX_TEST_RESULT([discard_granularity], [
17		AC_MSG_RESULT(yes)
18	],[
19		ZFS_LINUX_TEST_ERROR([ql->discard_granularity])
20	])
21])
22