]>
Commit | Line | Data |
---|---|---|
37f9dac5 RY |
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 # | |
608f8749 | 6 | dnl # |
37f9dac5 RY |
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. | |
608f8749 BB |
12 | dnl # |
13 | AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_RW_BARRIER], [ | |
14 | ZFS_LINUX_TEST_SRC([bio_rw_barrier], [ | |
37f9dac5 RY |
15 | #include <linux/bio.h> |
16 | ],[ | |
17 | int flags __attribute__ ((unused)); | |
18 | flags = BIO_RW_BARRIER; | |
608f8749 BB |
19 | ]) |
20 | ]) | |
21 | ||
22 | AC_DEFUN([ZFS_AC_KERNEL_BIO_RW_BARRIER], [ | |
23 | AC_MSG_CHECKING([whether BIO_RW_BARRIER is defined]) | |
24 | ZFS_LINUX_TEST_RESULT([bio_rw_barrier], [ | |
37f9dac5 RY |
25 | AC_MSG_RESULT(yes) |
26 | AC_DEFINE(HAVE_BIO_RW_BARRIER, 1, [BIO_RW_BARRIER is defined]) | |
27 | ],[ | |
28 | AC_MSG_RESULT(no) | |
29 | ]) | |
30 | ]) |