]>
Commit | Line | Data |
---|---|---|
34037afe ED |
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" | |
e191b54e | 10 | EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}" |
34037afe ED |
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 | ]) |