The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/config/kernel-block-device-operations.m4

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 dnl #
    2 dnl # 2.6.38 API change
    3 dnl #
    4 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS], [
    5         ZFS_LINUX_TEST_SRC([block_device_operations_check_events], [
    6                 #include <linux/blkdev.h>
    7 
    8                 unsigned int blk_check_events(struct gendisk *disk,
    9                     unsigned int clearing) {
   10                         (void) disk, (void) clearing;
   11                         return (0);
   12                 }
   13 
   14                 static const struct block_device_operations
   15                     bops __attribute__ ((unused)) = {
   16                         .check_events   = blk_check_events,
   17                 };
   18         ], [], [])
   19 ])
   20 
   21 AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS], [
   22         AC_MSG_CHECKING([whether bops->check_events() exists])
   23         ZFS_LINUX_TEST_RESULT([block_device_operations_check_events], [
   24                 AC_MSG_RESULT(yes)
   25         ],[
   26                 ZFS_LINUX_TEST_ERROR([bops->check_events()])
   27         ])
   28 ])
   29 
   30 dnl #
   31 dnl # 3.10.x API change
   32 dnl #
   33 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
   34         ZFS_LINUX_TEST_SRC([block_device_operations_release_void], [
   35                 #include <linux/blkdev.h>
   36 
   37                 void blk_release(struct gendisk *g, fmode_t mode) {
   38                         (void) g, (void) mode;
   39                         return;
   40                 }
   41 
   42                 static const struct block_device_operations
   43                     bops __attribute__ ((unused)) = {
   44                         .open           = NULL,
   45                         .release        = blk_release,
   46                         .ioctl          = NULL,
   47                         .compat_ioctl   = NULL,
   48                 };
   49         ], [], [])
   50 ])
   51 
   52 AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
   53         AC_MSG_CHECKING([whether bops->release() is void])
   54         ZFS_LINUX_TEST_RESULT([block_device_operations_release_void], [
   55                 AC_MSG_RESULT(yes)
   56         ],[
   57                 ZFS_LINUX_TEST_ERROR([bops->release()])
   58         ])
   59 ])
   60 
   61 dnl #
   62 dnl # 5.13 API change
   63 dnl # block_device_operations->revalidate_disk() was removed
   64 dnl #
   65 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK], [
   66         ZFS_LINUX_TEST_SRC([block_device_operations_revalidate_disk], [
   67                 #include <linux/blkdev.h>
   68 
   69                 int blk_revalidate_disk(struct gendisk *disk) {
   70                         (void) disk;
   71                         return(0);
   72                 }
   73 
   74                 static const struct block_device_operations
   75                     bops __attribute__ ((unused)) = {
   76                         .revalidate_disk        = blk_revalidate_disk,
   77                 };
   78         ], [], [])
   79 ])
   80 
   81 AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK], [
   82         AC_MSG_CHECKING([whether bops->revalidate_disk() exists])
   83         ZFS_LINUX_TEST_RESULT([block_device_operations_revalidate_disk], [
   84                 AC_DEFINE([HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK], [1],
   85                         [Define if revalidate_disk() in block_device_operations])
   86                 AC_MSG_RESULT(yes)
   87         ],[
   88                 AC_MSG_RESULT(no)
   89         ])
   90 ])
   91 
   92 AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS], [
   93         ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
   94         ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
   95         ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK
   96 ])
   97 
   98 AC_DEFUN([ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS], [
   99         ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS
  100         ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
  101         ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK
  102 ])

Cache object: 327938e37b172355049b7aab658ac92b


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.