]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-bio-rw-discard.m4
Fix typo/etc in module/zfs/zfs_ctldir.c
[mirror_zfs.git] / config / kernel-bio-rw-discard.m4
CommitLineData
37f9dac5
RY
1dnl #
2dnl # Interface for issuing a discard bio:
3dnl # 2.6.28-2.6.35: BIO_RW_DISCARD
4dnl # 2.6.36-3.x: REQ_DISCARD
5dnl #
6
7dnl # Since REQ_DISCARD is a preprocessor definition, there is no need for an
8dnl # autotools check for it. Also, REQ_DISCARD existed in the request layer
9dnl # until torvalds/linux@7b6d91daee5cac6402186ff224c3af39d79f4a0e unified the
10dnl # request layer and bio layer flags, so it would be wrong to assume that
11dnl # the APIs are mutually exclusive contrary to the typical case.
12AC_DEFUN([ZFS_AC_KERNEL_BIO_RW_DISCARD], [
13 AC_MSG_CHECKING([whether BIO_RW_DISCARD is defined])
14 ZFS_LINUX_TRY_COMPILE([
15 #include <linux/bio.h>
16 ],[
17 int flags __attribute__ ((unused));
18 flags = BIO_RW_DISCARD;
19 ],[
20 AC_MSG_RESULT(yes)
21 AC_DEFINE(HAVE_BIO_RW_DISCARD, 1, [BIO_RW_DISCARD is defined])
22 ],[
23 AC_MSG_RESULT(no)
24 ])
25])