2 dnl # Linux 3.2 API Change
3 dnl # make_request_fn returns void instead of int.
5 dnl # Linux 4.4 API Change
6 dnl # make_request_fn returns blk_qc_t.
8 AC_DEFUN([ZFS_AC_KERNEL_MAKE_REQUEST_FN], [
9 AC_MSG_CHECKING([whether make_request_fn() returns int])
10 ZFS_LINUX_TRY_COMPILE([
11 #include <linux/blkdev.h>
13 int make_request(struct request_queue *q, struct bio *bio)
18 blk_queue_make_request(NULL, &make_request);
21 AC_DEFINE(MAKE_REQUEST_FN_RET, int,
22 [make_request_fn() returns int])
23 AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_INT, 1,
24 [Noting that make_request_fn() returns int])
27 AC_MSG_CHECKING([whether make_request_fn() returns void])
28 ZFS_LINUX_TRY_COMPILE([
29 #include <linux/blkdev.h>
31 void make_request(struct request_queue *q, struct bio *bio)
36 blk_queue_make_request(NULL, &make_request);
39 AC_DEFINE(MAKE_REQUEST_FN_RET, void,
40 [make_request_fn() returns void])
43 AC_MSG_CHECKING([whether make_request_fn() returns blk_qc_t])
44 ZFS_LINUX_TRY_COMPILE([
45 #include <linux/blkdev.h>
47 blk_qc_t make_request(struct request_queue *q, struct bio *bio)
49 return (BLK_QC_T_NONE);
52 blk_queue_make_request(NULL, &make_request);
55 AC_DEFINE(MAKE_REQUEST_FN_RET, blk_qc_t,
56 [make_request_fn() returns blk_qc_t])
57 AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_QC, 1,
58 [Noting that make_request_fn() returns blk_qc_t])
60 AC_MSG_ERROR(no - Please file a bug report at
61 https://github.com/zfsonlinux/zfs/issues/new)