]> git.proxmox.com Git - mirror_zfs-debian.git/blame - config/kernel-blk-queue-nonrot.m4
Update SAs when an inode is dirtied
[mirror_zfs-debian.git] / config / kernel-blk-queue-nonrot.m4
CommitLineData
34037afe
ED
1dnl #
2dnl # 2.6.27 API change
3dnl # The blk_queue_nonrot() function and QUEUE_FLAG_NONROT flag were
4dnl # added so non-rotational devices could be identified. These devices
5dnl # have no seek time which the higher level elevator uses to optimize
6dnl # how the I/O issued to the device.
7dnl #
8AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_NONROT], [
9 AC_MSG_CHECKING([whether blk_queue_nonrot() is available])
10 tmp_flags="$EXTRA_KCFLAGS"
11 EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
12 ZFS_LINUX_TRY_COMPILE([
13 #include <linux/blkdev.h>
14 ],[
15 struct request_queue *q = NULL;
16 (void) blk_queue_nonrot(q);
17 ],[
18 AC_MSG_RESULT(yes)
19 AC_DEFINE(HAVE_BLK_QUEUE_NONROT, 1,
20 [blk_queue_nonrot() is available])
21 ],[
22 AC_MSG_RESULT(no)
23 ])
24 EXTRA_KCFLAGS="$tmp_flags"
25])