diff options
Diffstat (limited to 'config/kernel-blk-queue-flags.m4')
-rw-r--r-- | config/kernel-blk-queue-flags.m4 | 38 |
1 files changed, 38 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) + ]) +]) |