ZAP: Add by_dnode variants to lookup/prefetch_uint64
[zfs.git] / config / kernel-fsync-bdev.m4
blobc47e236f705fe433eb3dc0b06df5fbd0a4785d13
1 dnl #
2 dnl # 6.6 API change,
3 dnl # fsync_bdev was removed in favor of sync_blockdev
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_SRC_SYNC_BDEV], [
6         ZFS_LINUX_TEST_SRC([fsync_bdev], [
7                 #include <linux/blkdev.h>
8         ],[
9                 fsync_bdev(NULL);
10         ])
12         ZFS_LINUX_TEST_SRC([sync_blockdev], [
13                 #include <linux/blkdev.h>
14         ],[
15                 sync_blockdev(NULL);
16         ])
19 AC_DEFUN([ZFS_AC_KERNEL_SYNC_BDEV], [
20         AC_MSG_CHECKING([whether fsync_bdev() exists])
21         ZFS_LINUX_TEST_RESULT([fsync_bdev], [
22                 AC_MSG_RESULT(yes)
23                 AC_DEFINE(HAVE_FSYNC_BDEV, 1,
24                     [fsync_bdev() is declared in include/blkdev.h])
25         ],[
26                 AC_MSG_CHECKING([whether sync_blockdev() exists])
27                 ZFS_LINUX_TEST_RESULT([sync_blockdev], [
28                         AC_MSG_RESULT(yes)
29                         AC_DEFINE(HAVE_SYNC_BLOCKDEV, 1,
30                             [sync_blockdev() is declared in include/blkdev.h])
31                 ],[
32                         ZFS_LINUX_TEST_ERROR(
33                             [neither fsync_bdev() nor sync_blockdev() exist])
34                 ])
35         ])