]> git.proxmox.com Git - mirror_zfs-debian.git/blame - config/kernel-bio-op.m4
Remove not needed .pc directory
[mirror_zfs-debian.git] / config / kernel-bio-op.m4
CommitLineData
87dac73d
AX
1dnl #
2dnl # Linux 4.8 API,
3dnl #
4dnl # The bio_op() helper was introduced as a replacement for explicitly
5dnl # checking the bio->bi_rw flags. The following checks are used to
6dnl # detect if a specific operation is supported.
7dnl #
8AC_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>
12 ],[
13 enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD;
14 ],[
15 AC_MSG_RESULT(yes)
16 AC_DEFINE(HAVE_REQ_OP_DISCARD, 1,
17 [REQ_OP_DISCARD is defined])
18 ],[
19 AC_MSG_RESULT(no)
20 ])
21])
22
23AC_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>
27 ],[
28 enum req_op op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
29 ],[
30 AC_MSG_RESULT(yes)
31 AC_DEFINE(HAVE_REQ_OP_SECURE_DISCARD, 1,
32 [REQ_OP_SECURE_ERASE is defined])
33 ],[
34 AC_MSG_RESULT(no)
35 ])
36])
37
38
39AC_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>
43 ],[
44 enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH;
45 ],[
46 AC_MSG_RESULT(yes)
47 AC_DEFINE(HAVE_REQ_OP_FLUSH, 1,
48 [REQ_OP_FLUSH is defined])
49 ],[
50 AC_MSG_RESULT(no)
51 ])
52])
53
54AC_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>
58 ],[
59 struct bio bio __attribute__ ((unused));
60 bio.bi_opf = 0;
61 ],[
62 AC_MSG_RESULT(yes)
63 AC_DEFINE(HAVE_BIO_BI_OPF, 1, [bio->bi_opf is defined])
64 ],[
65 AC_MSG_RESULT(no)
66 ])
67])