]> granicus.if.org Git - zfs/blob - config/kernel-blk-queue-unplug.m4
Add back iostat -y or -w descriptions
[zfs] / config / kernel-blk-queue-unplug.m4
1 dnl #
2 dnl # 2.6.32-2.6.35 API - The BIO_RW_UNPLUG enum can be used as a hint
3 dnl # to unplug the queue.
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_HAVE_BIO_RW_UNPLUG], [
6         AC_MSG_CHECKING([whether the BIO_RW_UNPLUG enum is available])
7         tmp_flags="$EXTRA_KCFLAGS"
8         EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
9         ZFS_LINUX_TRY_COMPILE([
10                 #include <linux/blkdev.h>
11         ],[
12                 extern enum bio_rw_flags rw;
13
14                 rw = BIO_RW_UNPLUG;
15         ],[
16                 AC_MSG_RESULT(yes)
17                 AC_DEFINE(HAVE_BLK_QUEUE_HAVE_BIO_RW_UNPLUG, 1,
18                           [BIO_RW_UNPLUG is available])
19         ],[
20                 AC_MSG_RESULT(no)
21         ])
22         EXTRA_KCFLAGS="$tmp_flags"
23 ])
24
25 AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_HAVE_BLK_PLUG], [
26         AC_MSG_CHECKING([whether struct blk_plug is available])
27         tmp_flags="$EXTRA_KCFLAGS"
28         EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
29         ZFS_LINUX_TRY_COMPILE([
30                 #include <linux/blkdev.h>
31         ],[
32                 struct blk_plug plug;
33
34                 blk_start_plug(&plug);
35                 blk_finish_plug(&plug);
36         ],[
37                 AC_MSG_RESULT(yes)
38                 AC_DEFINE(HAVE_BLK_QUEUE_HAVE_BLK_PLUG, 1,
39                           [struct blk_plug is available])
40         ],[
41                 AC_MSG_RESULT(no)
42         ])
43         EXTRA_KCFLAGS="$tmp_flags"
44 ])