]> git.proxmox.com Git - mirror_zfs-debian.git/blob - config/kernel-blk-queue-physical-block-size.m4
Imported Upstream version 0.6.4.2
[mirror_zfs-debian.git] / config / kernel-blk-queue-physical-block-size.m4
1 dnl #
2 dnl # 2.6.30 API change
3 dnl # The blk_queue_physical_block_size() function was introduced to
4 dnl # indicate the smallest I/O the device can write without incurring
5 dnl # a read-modify-write penalty.
6 dnl #
7 AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_PHYSICAL_BLOCK_SIZE], [
8 AC_MSG_CHECKING([whether blk_queue_physical_block_size() is available])
9 tmp_flags="$EXTRA_KCFLAGS"
10 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
11 ZFS_LINUX_TRY_COMPILE([
12 #include <linux/blkdev.h>
13 ],[
14 struct request_queue *q = NULL;
15 unsigned short block_size = 1;
16 (void) blk_queue_physical_block_size(q, block_size);
17 ],[
18 AC_MSG_RESULT(yes)
19 AC_DEFINE(HAVE_BLK_QUEUE_PHYSICAL_BLOCK_SIZE, 1,
20 [blk_queue_physical_block_size() is available])
21 ],[
22 AC_MSG_RESULT(no)
23 ])
24 EXTRA_KCFLAGS="$tmp_flags"
25 ])