]>
Commit | Line | Data |
---|---|---|
c9c0d073 | 1 | dnl # |
675de5aa BB |
2 | dnl # Preferred interface for flagging a synchronous bio: |
3 | dnl # 2.6.12-2.6.29: BIO_RW_SYNC | |
4 | dnl # 2.6.30-2.6.35: BIO_RW_SYNCIO | |
5 | dnl # 2.6.36-2.6.xx: REQ_SYNC | |
c9c0d073 | 6 | dnl # |
675de5aa BB |
7 | AC_DEFUN([ZFS_AC_KERNEL_BIO_RW_SYNC], [ |
8 | AC_MSG_CHECKING([whether BIO_RW_SYNC is defined]) | |
9 | ZFS_LINUX_TRY_COMPILE([ | |
10 | #include <linux/bio.h> | |
11 | ],[ | |
79713039 | 12 | int flags __attribute__ ((unused)); |
675de5aa BB |
13 | flags = BIO_RW_SYNC; |
14 | ],[ | |
15 | AC_MSG_RESULT(yes) | |
16 | AC_DEFINE(HAVE_BIO_RW_SYNC, 1, [BIO_RW_SYNC is defined]) | |
17 | ],[ | |
18 | AC_MSG_RESULT(no) | |
19 | ]) | |
20 | ]) | |
21 | ||
c9c0d073 BB |
22 | AC_DEFUN([ZFS_AC_KERNEL_BIO_RW_SYNCIO], [ |
23 | AC_MSG_CHECKING([whether BIO_RW_SYNCIO is defined]) | |
24 | ZFS_LINUX_TRY_COMPILE([ | |
25 | #include <linux/bio.h> | |
26 | ],[ | |
79713039 | 27 | int flags __attribute__ ((unused)); |
c9c0d073 BB |
28 | flags = BIO_RW_SYNCIO; |
29 | ],[ | |
30 | AC_MSG_RESULT(yes) | |
675de5aa BB |
31 | AC_DEFINE(HAVE_BIO_RW_SYNCIO, 1, [BIO_RW_SYNCIO is defined]) |
32 | ],[ | |
33 | AC_MSG_RESULT(no) | |
34 | ]) | |
35 | ]) | |
36 | ||
37 | AC_DEFUN([ZFS_AC_KERNEL_REQ_SYNC], [ | |
38 | AC_MSG_CHECKING([whether REQ_SYNC is defined]) | |
39 | ZFS_LINUX_TRY_COMPILE([ | |
40 | #include <linux/bio.h> | |
41 | ],[ | |
79713039 | 42 | int flags __attribute__ ((unused)); |
675de5aa BB |
43 | flags = REQ_SYNC; |
44 | ],[ | |
45 | AC_MSG_RESULT(yes) | |
46 | AC_DEFINE(HAVE_REQ_SYNC, 1, [REQ_SYNC is defined]) | |
c9c0d073 BB |
47 | ],[ |
48 | AC_MSG_RESULT(no) | |
49 | ]) | |
50 | ]) |