]> git.proxmox.com Git - mirror_zfs-debian.git/blame - config/kernel-bio-rw-syncio.m4
Imported Upstream version 0.6.4.2
[mirror_zfs-debian.git] / config / kernel-bio-rw-syncio.m4
CommitLineData
c9c0d073 1dnl #
675de5aa
BB
2dnl # Preferred interface for flagging a synchronous bio:
3dnl # 2.6.12-2.6.29: BIO_RW_SYNC
4dnl # 2.6.30-2.6.35: BIO_RW_SYNCIO
5dnl # 2.6.36-2.6.xx: REQ_SYNC
c9c0d073 6dnl #
675de5aa
BB
7AC_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
22AC_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
37AC_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])