diff options
author | Brian Behlendorf <[email protected]> | 2020-12-21 10:11:56 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2020-12-23 14:35:47 -0800 |
commit | 03ad94a3b26d3e78ab77baf78804d98af011713f (patch) | |
tree | a03d04ffe136f155856295177b65cea7dd29b9c8 /include/os/linux | |
parent | 7a7e1014371c2830d761e17f965f29fdd0edebde (diff) |
Linux 4.18.0-257.el8 compat: blk_alloc_queue()
The CentOS stream 4.18.0-257 kernel appears to have backported
the Linux 5.9 change to make_request_fn and the associated API.
To maintain weak modules compatibility the original symbol was
retained and the new interface blk_alloc_queue_rh() was added.
Unfortunately, blk_alloc_queue() was replaced in the blkdev.h
header by blk_alloc_queue_bh() so there doesn't seem to be a way
to build new kmods against the old interfces. Even though they
appear to still be available for weak module binding.
To accommodate this a configure check is added for the new _rh()
variant of the function and used if available. If compatibility
code gets added to the kernel for the original blk_alloc_queue()
interface this should be fine. OpenZFS will simply continue to
prefer the new interface and only fallback to blk_alloc_queue()
when blk_alloc_queue_rh() isn't available.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #11374
Diffstat (limited to 'include/os/linux')
-rw-r--r-- | include/os/linux/kernel/linux/blkdev_compat.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/os/linux/kernel/linux/blkdev_compat.h b/include/os/linux/kernel/linux/blkdev_compat.h index 35b775633..220344c81 100644 --- a/include/os/linux/kernel/linux/blkdev_compat.h +++ b/include/os/linux/kernel/linux/blkdev_compat.h @@ -529,6 +529,8 @@ blk_generic_alloc_queue(make_request_fn make_request, int node_id) { #if defined(HAVE_BLK_ALLOC_QUEUE_REQUEST_FN) return (blk_alloc_queue(make_request, node_id)); +#elif defined(HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH) + return (blk_alloc_queue_rh(make_request, node_id)); #else struct request_queue *q = blk_alloc_queue(GFP_KERNEL); if (q != NULL) |