2 dnl # 2.6.30 API change
3 dnl # bdev_hardsect_size() replaced with bdev_logical_block_size(). While
4 dnl # it has been true for a while that there was no strict 1:1 mapping
5 dnl # between physical sector size and logical block size this change makes
8 AC_DEFUN([ZFS_AC_KERNEL_BDEV_LOGICAL_BLOCK_SIZE], [
9 AC_MSG_CHECKING([whether bdev_logical_block_size() is available])
10 tmp_flags="$EXTRA_KCFLAGS"
11 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
12 ZFS_LINUX_TRY_COMPILE([
13 #include <linux/blkdev.h>
15 struct block_device *bdev = NULL;
16 bdev_logical_block_size(bdev);
19 AC_DEFINE(HAVE_BDEV_LOGICAL_BLOCK_SIZE, 1,
20 [bdev_logical_block_size() is available])
24 EXTRA_KCFLAGS="$tmp_flags"