]> git.proxmox.com Git - mirror_zfs-debian.git/blob - config/kernel-bio-rw-syncio.m4
Linux 3.1 compat, fops->fsync()
[mirror_zfs-debian.git] / config / kernel-bio-rw-syncio.m4
1 dnl #
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
6 dnl #
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 ],[
12 int flags __attribute__ ((unused));
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
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 ],[
27 int flags __attribute__ ((unused));
28 flags = BIO_RW_SYNCIO;
29 ],[
30 AC_MSG_RESULT(yes)
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 ],[
42 int flags __attribute__ ((unused));
43 flags = REQ_SYNC;
44 ],[
45 AC_MSG_RESULT(yes)
46 AC_DEFINE(HAVE_REQ_SYNC, 1, [REQ_SYNC is defined])
47 ],[
48 AC_MSG_RESULT(no)
49 ])
50 ])