Whamcloud - gitweb
LU-506 FC15: unplug_fn removed since 2.6.39.
[fs/lustre-release.git] / lustre / autoconf / lustre-core.m4
index 52c1db2..15c8a99 100644 (file)
@@ -2057,6 +2057,24 @@ LB_LINUX_TRY_COMPILE([
 ])
 ])
 
+#
+# 2.6.39 remove unplug_fn from request_queue.
+#
+AC_DEFUN([LC_REQUEST_QUEUE_UNPLUG_FN],
+[AC_MSG_CHECKING([if request_queue has unplug_fn field])
+LB_LINUX_TRY_COMPILE([
+        #include <linux/blkdev.h>
+],[
+        struct request_queue rq;
+        memset(rq.unplug_fn, 0, sizeof(rq.unplug_fn));
+],[
+        AC_DEFINE(HAVE_REQUEST_QUEUE_UNPLUG_FN, 1,
+                [request_queue has unplug_fn field]),
+        AC_MSG_RESULT([yes])
+],[
+        AC_MSG_RESULT([no])
+])
+])
 
 #
 # LC_PROG_LINUX
@@ -2209,6 +2227,9 @@ AC_DEFUN([LC_PROG_LINUX],
          LC_BLK_QUEUE_MAX_SECTORS
          LC_BLK_QUEUE_MAX_SEGMENTS
 
+         # 2.6.39
+         LC_REQUEST_QUEUE_UNPLUG_FN
+
          #
          if test x$enable_server = xyes ; then
              AC_DEFINE(HAVE_SERVER_SUPPORT, 1, [support server])