summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-01-24 11:33:47 -0800
committerGitHub <[email protected]>2018-01-24 11:33:47 -0800
commit23602fdb39e1254c669707ec9d2d0e6bcdbf1771 (patch)
treec294d9b4733ee141b6457285c6184e74fa0143a5 /config
parentfb79036f288ea60b59d21fe250bc17445cf69f37 (diff)
Add cv_timedwait_io()
Add missing helper function cv_timedwait_io(), it should be used when waiting on IO with a specified timeout. Reviewed-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #674
Diffstat (limited to 'config')
-rw-r--r--config/spl-build.m421
1 files changed, 21 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4
index 926abd5c8..afc8de65f 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -52,6 +52,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
SPL_AC_KMEM_CACHE_CREATE_USERCOPY
SPL_AC_WAIT_QUEUE_ENTRY_T
SPL_AC_WAIT_QUEUE_HEAD_ENTRY
+ SPL_AC_IO_SCHEDULE_TIMEOUT
SPL_AC_KERNEL_WRITE
SPL_AC_KERNEL_READ
SPL_AC_KERNEL_TIMER_FUNCTION_TIMER_LIST
@@ -1599,6 +1600,26 @@ AC_DEFUN([SPL_AC_WAIT_QUEUE_HEAD_ENTRY], [
])
dnl #
+dnl # 3.19 API change
+dnl # The io_schedule_timeout() function is present in all 2.6.32 kernels
+dnl # but it was not exported until Linux 3.19. The RHEL 7.x kernels which
+dnl # are based on a 3.10 kernel do export this symbol.
+dnl #
+AC_DEFUN([SPL_AC_IO_SCHEDULE_TIMEOUT], [
+ AC_MSG_CHECKING([whether io_schedule_timeout() is available])
+ SPL_LINUX_TRY_COMPILE_SYMBOL([
+ #include <linux/sched.h>
+ ], [
+ (void) io_schedule_timeout(1);
+ ], [io_schedule_timeout], [], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_IO_SCHEDULE_TIMEOUT, 1, [yes])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
+
+dnl #
dnl # 4.14 API change
dnl # kernel_write() which was introduced in 3.9 was updated to take
dnl # the offset as a pointer which is needed by vn_rdwr().