2019-10-01 19:50:34 +00:00
|
|
|
dnl #
|
|
|
|
dnl # Check for make_request_fn interface.
|
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
|
|
|
|
ZFS_LINUX_TEST_SRC([make_request_fn_void], [
|
|
|
|
#include <linux/blkdev.h>
|
|
|
|
void make_request(struct request_queue *q,
|
|
|
|
struct bio *bio) { return; }
|
|
|
|
],[
|
|
|
|
blk_queue_make_request(NULL, &make_request);
|
|
|
|
])
|
|
|
|
|
|
|
|
ZFS_LINUX_TEST_SRC([make_request_fn_blk_qc_t], [
|
|
|
|
#include <linux/blkdev.h>
|
|
|
|
blk_qc_t make_request(struct request_queue *q,
|
|
|
|
struct bio *bio) { return (BLK_QC_T_NONE); }
|
|
|
|
],[
|
|
|
|
blk_queue_make_request(NULL, &make_request);
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_MAKE_REQUEST_FN], [
|
|
|
|
dnl #
|
2019-11-12 16:59:06 +00:00
|
|
|
dnl # Linux 3.2 API Change
|
|
|
|
dnl # make_request_fn returns void.
|
2019-10-01 19:50:34 +00:00
|
|
|
dnl #
|
2019-11-12 16:59:06 +00:00
|
|
|
AC_MSG_CHECKING([whether make_request_fn() returns void])
|
|
|
|
ZFS_LINUX_TEST_RESULT([make_request_fn_void], [
|
2019-10-01 19:50:34 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
2019-11-12 16:59:06 +00:00
|
|
|
AC_DEFINE(MAKE_REQUEST_FN_RET, void,
|
2019-10-01 19:50:34 +00:00
|
|
|
[make_request_fn() return type])
|
2019-11-12 16:59:06 +00:00
|
|
|
AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_VOID, 1,
|
|
|
|
[Noting that make_request_fn() returns void])
|
2019-10-01 19:50:34 +00:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
|
|
|
|
dnl #
|
2019-11-12 16:59:06 +00:00
|
|
|
dnl # Linux 4.4 API Change
|
|
|
|
dnl # make_request_fn returns blk_qc_t.
|
2019-10-01 19:50:34 +00:00
|
|
|
dnl #
|
2019-11-12 16:59:06 +00:00
|
|
|
AC_MSG_CHECKING(
|
|
|
|
[whether make_request_fn() returns blk_qc_t])
|
|
|
|
ZFS_LINUX_TEST_RESULT([make_request_fn_blk_qc_t], [
|
2019-10-01 19:50:34 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
2019-11-12 16:59:06 +00:00
|
|
|
AC_DEFINE(MAKE_REQUEST_FN_RET, blk_qc_t,
|
2019-10-01 19:50:34 +00:00
|
|
|
[make_request_fn() return type])
|
2019-11-12 16:59:06 +00:00
|
|
|
AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_QC, 1,
|
|
|
|
[Noting that make_request_fn() ]
|
|
|
|
[returns blk_qc_t])
|
2019-10-01 19:50:34 +00:00
|
|
|
],[
|
2019-11-12 16:59:06 +00:00
|
|
|
ZFS_LINUX_TEST_ERROR([make_request_fn])
|
2019-10-01 19:50:34 +00:00
|
|
|
])
|
|
|
|
])
|
|
|
|
])
|