diff options
Diffstat (limited to 'config/kernel-bio-failfast.m4')
-rw-r--r-- | config/kernel-bio-failfast.m4 | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/config/kernel-bio-failfast.m4 b/config/kernel-bio-failfast.m4 new file mode 100644 index 000000000..acc657562 --- /dev/null +++ b/config/kernel-bio-failfast.m4 @@ -0,0 +1,22 @@ +dnl # +dnl # 2.6.28 API change +dnl # Device, transport, and driver FAILFAST flags were added and +dnl # the now legacy BIO_RW_FAILFAST flag was removed. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_BIO_FAILFAST], [ + AC_MSG_CHECKING([whether BIO_RW_FAILFAST_* are defined]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/bio.h> + ],[ + int flags; + flags = ((1 << BIO_RW_FAILFAST_DEV) | + (1 << BIO_RW_FAILFAST_TRANSPORT) | + (1 << BIO_RW_FAILFAST_DRIVER)); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_BIO_RW_FAILFAST, 1, + [BIO_RW_FAILFAST_* are defined]) + ],[ + AC_MSG_RESULT(no) + ]) +]) |