]> git.proxmox.com Git - mirror_zfs-debian.git/blob - config/kernel-blk-queue-discard.m4
Move partition scanning from userspace to module.
[mirror_zfs-debian.git] / config / kernel-blk-queue-discard.m4
1 dnl #
2 dnl # 2.6.32 API change
3 dnl # Discard requests were moved to the normal I/O path.
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_DISCARD], [
6 AC_MSG_CHECKING([whether blk_queue_discard() is available])
7 tmp_flags="$EXTRA_KCFLAGS"
8 EXTRA_KCFLAGS="-Wno-unused-but-set-variable"
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 ])