ZAP: Add by_dnode variants to lookup/prefetch_uint64
[zfs.git] / config / kernel-genhd-flags.m4
blob60cc3173397cc757a60dc33c001ea439cbf75bd2
1 dnl #
2 dnl # 5.17 API change,
3 dnl #
4 dnl # GENHD_FL_EXT_DEVT flag removed
5 dnl # GENHD_FL_NO_PART_SCAN renamed GENHD_FL_NO_PART
6 dnl #
7 AC_DEFUN([ZFS_AC_KERNEL_SRC_GENHD_FLAGS], [
9         ZFS_LINUX_TEST_SRC([genhd_fl_ext_devt], [
10                 #include <linux/blkdev.h>
11         ], [
12                 int flags __attribute__ ((unused)) = GENHD_FL_EXT_DEVT;
13         ])
15         ZFS_LINUX_TEST_SRC([genhd_fl_no_part], [
16                 #include <linux/blkdev.h>
17         ], [
18                 int flags __attribute__ ((unused)) = GENHD_FL_NO_PART;
19         ])
22 AC_DEFUN([ZFS_AC_KERNEL_GENHD_FLAGS], [
24         AC_MSG_CHECKING([whether GENHD_FL_EXT_DEVT flag is available])
25         ZFS_LINUX_TEST_RESULT([genhd_fl_ext_devt], [
26                 AC_MSG_RESULT(yes)
27                 AC_DEFINE(HAVE_GENHD_FL_EXT_DEVT, 1,
28                     [GENHD_FL_EXT_DEVT flag is available])
29         ], [
30                 AC_MSG_RESULT(no)
31         ])
33         AC_MSG_CHECKING([whether GENHD_FL_NO_PART flag is available])
34         ZFS_LINUX_TEST_RESULT([genhd_fl_no_part], [
35                 AC_MSG_RESULT(yes)
36                 AC_DEFINE(HAVE_GENHD_FL_NO_PART, 1,
37                     [GENHD_FL_NO_PART flag is available])
38         ], [
39                 AC_MSG_RESULT(no)
40         ])