aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2018-04-10 10:32:14 -0700
committerTony Hutter <[email protected]>2018-05-07 17:19:57 -0700
commit2f118072cbd2146fd8b5d79de5cc6ad537617ac6 (patch)
tree2412afb8e3c11570f7ff8c2545cf011aa2a8b33f /config
parent7440f10ec11e2f240e3a601dd4e960bda4ebf340 (diff)
Linux compat 4.16: blk_queue_flag_{set,clear}
queue_flag_{set,clear}_unlocked are now private interfaces in the Linux kernel (https://github.com/torvalds/linux/commit/8a0ac14). Use blk_queue_flag_{set,clear} interfaces which were introduced as of https://github.com/torvalds/linux/commit/8814ce8. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #7410
Diffstat (limited to 'config')
-rw-r--r--config/kernel-blk-queue-flags.m438
-rw-r--r--config/kernel.m42
2 files changed, 40 insertions, 0 deletions
diff --git a/config/kernel-blk-queue-flags.m4 b/config/kernel-blk-queue-flags.m4
new file mode 100644
index 000000000..b570245c7
--- /dev/null
+++ b/config/kernel-blk-queue-flags.m4
@@ -0,0 +1,38 @@
+dnl #
+dnl # API change
+dnl # https://github.com/torvalds/linux/commit/8814ce8
+dnl # Introduction of blk_queue_flag_set and blk_queue_flag_clear
+dnl #
+
+AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_FLAG_SET], [
+ AC_MSG_CHECKING([whether blk_queue_flag_set() exists])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/kernel.h>
+ #include <linux/blkdev.h>
+ ],[
+ struct request_queue *q = NULL;
+ blk_queue_flag_set(0, q);
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BLK_QUEUE_FLAG_SET, 1, [blk_queue_flag_set() exists])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_FLAG_CLEAR], [
+ AC_MSG_CHECKING([whether blk_queue_flag_clear() exists])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/kernel.h>
+ #include <linux/blkdev.h>
+ ],[
+ struct request_queue *q = NULL;
+ blk_queue_flag_clear(0, q);
+ ],[
+
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_BLK_QUEUE_FLAG_CLEAR, 1, [blk_queue_flag_clear() exists])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
diff --git a/config/kernel.m4 b/config/kernel.m4
index 910d4ff25..93158f3d0 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -35,6 +35,8 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_BIO_RW_BARRIER
ZFS_AC_KERNEL_BIO_RW_DISCARD
ZFS_AC_KERNEL_BLK_QUEUE_BDI
+ ZFS_AC_KERNEL_BLK_QUEUE_FLAG_CLEAR
+ ZFS_AC_KERNEL_BLK_QUEUE_FLAG_SET
ZFS_AC_KERNEL_BLK_QUEUE_FLUSH
ZFS_AC_KERNEL_BLK_QUEUE_MAX_HW_SECTORS
ZFS_AC_KERNEL_BLK_QUEUE_MAX_SEGMENTS