])
])
+#
+# 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
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])
return 0;
}
+#ifdef HAVE_REQUEST_QUEUE_UNPLUG_FN
/*
* kick off io on the underlying address space
*/
clear_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags);
blk_run_address_space(lo->lo_backing_file->f_mapping);
}
+#endif
static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio)
{
*/
blk_queue_make_request(lo->lo_queue, loop_make_request);
lo->lo_queue->queuedata = lo;
+#ifdef HAVE_REQUEST_QUEUE_UNPLUG_FN
lo->lo_queue->unplug_fn = loop_unplug;
+#endif
/* queue parameters */
CLASSERT(CFS_PAGE_SIZE < (1 << (sizeof(unsigned short) * 8)));