]> git.proxmox.com Git - mirror_zfs-debian.git/blame - config/kernel-blk-queue-discard.m4
Imported Upstream version 0.6.4.2
[mirror_zfs-debian.git] / config / kernel-blk-queue-discard.m4
CommitLineData
30930fba
ED
1dnl #
2dnl # 2.6.32 API change
3dnl # Discard requests were moved to the normal I/O path.
4dnl #
5AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_DISCARD], [
6 AC_MSG_CHECKING([whether blk_queue_discard() is available])
7 tmp_flags="$EXTRA_KCFLAGS"
e191b54e 8 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
30930fba
ED
9 ZFS_LINUX_TRY_COMPILE([
10 #include <linux/blkdev.h>
11 ],[
12 struct request_queue *q = NULL;
13 (void) blk_queue_discard(q);
14 ],[
15 AC_MSG_RESULT(yes)
16 AC_DEFINE(HAVE_BLK_QUEUE_DISCARD, 1,
17 [blk_queue_discard() is available])
18 ],[
19 AC_MSG_RESULT(no)
20 ])
21 EXTRA_KCFLAGS="$tmp_flags"
22])