summaryrefslogtreecommitdiffstats
path: root/config/kernel-bio-rw-barrier.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/kernel-bio-rw-barrier.m4')
-rw-r--r--config/kernel-bio-rw-barrier.m415
1 files changed, 10 insertions, 5 deletions
diff --git a/config/kernel-bio-rw-barrier.m4 b/config/kernel-bio-rw-barrier.m4
index bcf0f7ea0..f667d4884 100644
--- a/config/kernel-bio-rw-barrier.m4
+++ b/config/kernel-bio-rw-barrier.m4
@@ -3,20 +3,25 @@ dnl # Interface for issuing a discard bio:
dnl # 2.6.28-2.6.35: BIO_RW_BARRIER
dnl # 2.6.36-3.x: REQ_BARRIER
dnl #
-
+dnl #
dnl # Since REQ_BARRIER is a preprocessor definition, there is no need for an
dnl # autotools check for it. Also, REQ_BARRIER existed in the request layer
dnl # until torvalds/linux@7b6d91daee5cac6402186ff224c3af39d79f4a0e unified the
dnl # request layer and bio layer flags, so it would be wrong to assume that
dnl # the APIs are mutually exclusive contrary to the typical case.
-AC_DEFUN([ZFS_AC_KERNEL_BIO_RW_BARRIER], [
- AC_MSG_CHECKING([whether BIO_RW_BARRIER is defined])
- ZFS_LINUX_TRY_COMPILE([
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_RW_BARRIER], [
+ ZFS_LINUX_TEST_SRC([bio_rw_barrier], [
#include <linux/bio.h>
],[
int flags __attribute__ ((unused));
flags = BIO_RW_BARRIER;
- ],[
+ ])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_BIO_RW_BARRIER], [
+ AC_MSG_CHECKING([whether BIO_RW_BARRIER is defined])
+ ZFS_LINUX_TEST_RESULT([bio_rw_barrier], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BIO_RW_BARRIER, 1, [BIO_RW_BARRIER is defined])
],[