4 AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [
5 AC_MSG_CHECKING([block device operation prototypes])
6 tmp_flags="$EXTRA_KCFLAGS"
7 EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
8 ZFS_LINUX_TRY_COMPILE([
9 #include <linux/blkdev.h>
11 int blk_open(struct block_device *bdev, fmode_t mode)
13 int blk_release(struct gendisk *g, fmode_t mode) { return 0; }
14 int blk_ioctl(struct block_device *bdev, fmode_t mode,
15 unsigned x, unsigned long y) { return 0; }
16 int blk_compat_ioctl(struct block_device * bdev, fmode_t mode,
17 unsigned x, unsigned long y) { return 0; }
19 static const struct block_device_operations
20 bops __attribute__ ((unused)) = {
22 .release = blk_release,
24 .compat_ioctl = blk_compat_ioctl,
28 AC_MSG_RESULT(struct block_device)
29 AC_DEFINE(HAVE_BDEV_BLOCK_DEVICE_OPERATIONS, 1,
30 [struct block_device_operations use bdevs])
32 AC_MSG_RESULT(struct inode)
34 EXTRA_KCFLAGS="$tmp_flags"