xref: /freebsd/sys/contrib/openzfs/config/kernel-bio_max_segs.m4 (revision 2e3507c25e42292b45a5482e116d278f5515d04d)
1dnl #
2dnl # 5.12 API change removes BIO_MAX_PAGES in favor of bio_max_segs()
3dnl # which will handle the logic of setting the upper-bound to a
4dnl # BIO_MAX_PAGES, internally.
5dnl #
6AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_MAX_SEGS], [
7	ZFS_LINUX_TEST_SRC([bio_max_segs], [
8		#include <linux/bio.h>
9	],[
10		bio_max_segs(1);
11	])
12])
13
14AC_DEFUN([ZFS_AC_KERNEL_BIO_MAX_SEGS], [
15	AC_MSG_CHECKING([whether bio_max_segs() exists])
16	ZFS_LINUX_TEST_RESULT([bio_max_segs], [
17		AC_MSG_RESULT(yes)
18
19		AC_DEFINE([HAVE_BIO_MAX_SEGS], 1, [bio_max_segs() is implemented])
20	],[
21		AC_MSG_RESULT(no)
22	])
23])
24