4 dnl # The bio_op() helper was introduced as a replacement for explicitly
5 dnl # checking the bio->bi_rw flags. The following checks are used to
6 dnl # detect if a specific operation is supported.
8 AC_DEFUN([ZFS_AC_KERNEL_REQ_OP_DISCARD], [
9 AC_MSG_CHECKING([whether REQ_OP_DISCARD is defined])
10 ZFS_LINUX_TRY_COMPILE([
11 #include <linux/blk_types.h>
13 int op __attribute__ ((unused)) = REQ_OP_DISCARD;
16 AC_DEFINE(HAVE_REQ_OP_DISCARD, 1,
17 [REQ_OP_DISCARD is defined])
23 AC_DEFUN([ZFS_AC_KERNEL_REQ_OP_SECURE_ERASE], [
24 AC_MSG_CHECKING([whether REQ_OP_SECURE_ERASE is defined])
25 ZFS_LINUX_TRY_COMPILE([
26 #include <linux/blk_types.h>
28 int op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
31 AC_DEFINE(HAVE_REQ_OP_SECURE_ERASE, 1,
32 [REQ_OP_SECURE_ERASE is defined])
39 AC_DEFUN([ZFS_AC_KERNEL_REQ_OP_FLUSH], [
40 AC_MSG_CHECKING([whether REQ_OP_FLUSH is defined])
41 ZFS_LINUX_TRY_COMPILE([
42 #include <linux/blk_types.h>
44 int op __attribute__ ((unused)) = REQ_OP_FLUSH;
47 AC_DEFINE(HAVE_REQ_OP_FLUSH, 1,
48 [REQ_OP_FLUSH is defined])
54 AC_DEFUN([ZFS_AC_KERNEL_BIO_BI_OPF], [
55 AC_MSG_CHECKING([whether bio->bi_opf is defined])
56 ZFS_LINUX_TRY_COMPILE([
57 #include <linux/bio.h>
59 struct bio bio __attribute__ ((unused));
63 AC_DEFINE(HAVE_BIO_BI_OPF, 1, [bio->bi_opf is defined])
69 AC_DEFUN([ZFS_AC_KERNEL_HAVE_BIO_SET_OP_ATTRS], [
70 AC_MSG_CHECKING([whether bio_set_op_attrs is available])
71 ZFS_LINUX_TRY_COMPILE([
72 #include <linux/bio.h>
74 struct bio *bio __attribute__ ((unused)) = NULL;
76 bio_set_op_attrs(bio, 0, 0);
79 AC_DEFINE(HAVE_BIO_SET_OP_ATTRS, 1,
80 [bio_set_op_attrs is available])