aboutsummaryrefslogtreecommitdiffstats
path: root/config/kernel-make-request-fn.m4
diff options
context:
space:
mode:
authorColeman Kane <[email protected]>2020-08-09 12:12:25 -0400
committerBrian Behlendorf <[email protected]>2020-08-11 13:37:33 -0700
commitd817c17100183b266aa6bf8b868e016805d51d16 (patch)
treec6a0d14c441b00f12f6081b44f0d675fd61d45a1 /config/kernel-make-request-fn.m4
parentdcdc12e8babb2490249cd93ec77863b216c25c5d (diff)
Linux 5.9 compat: make_request_fn replaced with submit_bio interface
The make_request_fn and associated API was replaced recently in a Linux 5.9 merge, to replace its functionality with a new submit_bio member in struct block_device_operations. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #10696
Diffstat (limited to 'config/kernel-make-request-fn.m4')
-rw-r--r--config/kernel-make-request-fn.m484
1 files changed, 51 insertions, 33 deletions
diff --git a/config/kernel-make-request-fn.m4 b/config/kernel-make-request-fn.m4
index 609926c1b..1576fece1 100644
--- a/config/kernel-make-request-fn.m4
+++ b/config/kernel-make-request-fn.m4
@@ -26,57 +26,75 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
struct request_queue *q __attribute__ ((unused));
q = blk_alloc_queue(make_request, NUMA_NO_NODE);
])
+
+ ZFS_LINUX_TEST_SRC([block_device_operations_submit_bio], [
+ #include <linux/blkdev.h>
+ ],[
+ struct block_device_operations o;
+ o.submit_bio = NULL;
+ ])
])
AC_DEFUN([ZFS_AC_KERNEL_MAKE_REQUEST_FN], [
+ dnl # Checked as part of the blk_alloc_queue_request_fn test
dnl #
- dnl # Linux 5.7 API Change
- dnl # blk_alloc_queue() expects request function.
+ dnl # Linux 5.9 API Change
+ dnl # make_request_fn was moved into block_device_operations->submit_bio
dnl #
- AC_MSG_CHECKING([whether blk_alloc_queue() expects request function])
- ZFS_LINUX_TEST_RESULT([blk_alloc_queue_request_fn], [
+ AC_MSG_CHECKING([whether submit_bio is member of struct block_device_operations])
+ ZFS_LINUX_TEST_RESULT([block_device_operations_submit_bio], [
AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS, 1,
+ [submit_bio is member of struct block_device_operations])
+ ],[
dnl # Checked as part of the blk_alloc_queue_request_fn test
- AC_MSG_CHECKING([whether make_request_fn() returns blk_qc_t])
- AC_MSG_RESULT(yes)
-
- AC_DEFINE(HAVE_BLK_ALLOC_QUEUE_REQUEST_FN, 1,
- [blk_alloc_queue() expects request function])
- AC_DEFINE(MAKE_REQUEST_FN_RET, blk_qc_t,
- [make_request_fn() return type])
- AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_QC, 1,
- [Noting that make_request_fn() returns blk_qc_t])
- ],[
dnl #
- dnl # Linux 3.2 API Change
- dnl # make_request_fn returns void.
+ dnl # Linux 5.7 API Change
+ dnl # blk_alloc_queue() expects request function.
dnl #
- AC_MSG_CHECKING([whether make_request_fn() returns void])
- ZFS_LINUX_TEST_RESULT([make_request_fn_void], [
+ AC_MSG_CHECKING([whether blk_alloc_queue() expects request function])
+ ZFS_LINUX_TEST_RESULT([blk_alloc_queue_request_fn], [
+ AC_MSG_CHECKING([whether make_request_fn() returns blk_qc_t])
AC_MSG_RESULT(yes)
- AC_DEFINE(MAKE_REQUEST_FN_RET, void,
+
+ AC_DEFINE(HAVE_BLK_ALLOC_QUEUE_REQUEST_FN, 1,
+ [blk_alloc_queue() expects request function])
+ AC_DEFINE(MAKE_REQUEST_FN_RET, blk_qc_t,
[make_request_fn() return type])
- AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_VOID, 1,
- [Noting that make_request_fn() returns void])
+ AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_QC, 1,
+ [Noting that make_request_fn() returns blk_qc_t])
],[
- AC_MSG_RESULT(no)
-
dnl #
- dnl # Linux 4.4 API Change
- dnl # make_request_fn returns blk_qc_t.
+ dnl # Linux 3.2 API Change
+ dnl # make_request_fn returns void.
dnl #
- AC_MSG_CHECKING(
- [whether make_request_fn() returns blk_qc_t])
- ZFS_LINUX_TEST_RESULT([make_request_fn_blk_qc_t], [
+ AC_MSG_CHECKING([whether make_request_fn() returns void])
+ ZFS_LINUX_TEST_RESULT([make_request_fn_void], [
AC_MSG_RESULT(yes)
- AC_DEFINE(MAKE_REQUEST_FN_RET, blk_qc_t,
+ AC_DEFINE(MAKE_REQUEST_FN_RET, void,
[make_request_fn() return type])
- AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_QC, 1,
- [Noting that make_request_fn() ]
- [returns blk_qc_t])
+ AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_VOID, 1,
+ [Noting that make_request_fn() returns void])
],[
- ZFS_LINUX_TEST_ERROR([make_request_fn])
+ AC_MSG_RESULT(no)
+
+ dnl #
+ dnl # Linux 4.4 API Change
+ dnl # make_request_fn returns blk_qc_t.
+ dnl #
+ AC_MSG_CHECKING(
+ [whether make_request_fn() returns blk_qc_t])
+ ZFS_LINUX_TEST_RESULT([make_request_fn_blk_qc_t], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(MAKE_REQUEST_FN_RET, blk_qc_t,
+ [make_request_fn() return type])
+ AC_DEFINE(HAVE_MAKE_REQUEST_FN_RET_QC, 1,
+ [Noting that make_request_fn() ]
+ [returns blk_qc_t])
+ ],[
+ ZFS_LINUX_TEST_ERROR([make_request_fn])
+ ])
])
])
])