OpenZFS 6585 - sha512, skein, and edonr have an unenforced dependency on extensible...
[zfs.git] / config / kernel-bio-rw-barrier.m4
blobbcf0f7ea00b0267717b78fe74173a70634179d8a
1 dnl #
2 dnl # Interface for issuing a discard bio:
3 dnl # 2.6.28-2.6.35: BIO_RW_BARRIER
4 dnl # 2.6.36-3.x:    REQ_BARRIER
5 dnl #
7 dnl # Since REQ_BARRIER is a preprocessor definition, there is no need for an
8 dnl # autotools check for it. Also, REQ_BARRIER existed in the request layer
9 dnl # until torvalds/linux@7b6d91daee5cac6402186ff224c3af39d79f4a0e unified the
10 dnl # request layer and bio layer flags, so it would be wrong to assume that
11 dnl # the APIs are mutually exclusive contrary to the typical case.
12 AC_DEFUN([ZFS_AC_KERNEL_BIO_RW_BARRIER], [
13         AC_MSG_CHECKING([whether BIO_RW_BARRIER is defined])
14         ZFS_LINUX_TRY_COMPILE([
15                 #include <linux/bio.h>
16         ],[
17                 int flags __attribute__ ((unused));
18                 flags = BIO_RW_BARRIER;
19         ],[
20                 AC_MSG_RESULT(yes)
21                 AC_DEFINE(HAVE_BIO_RW_BARRIER, 1, [BIO_RW_BARRIER is defined])
22         ],[
23                 AC_MSG_RESULT(no)
24         ])