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-vfs-direct_IO.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 # Check for direct IO interfaces.
    3 dnl #
    4 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
    5         ZFS_LINUX_TEST_SRC([direct_io_iter], [
    6                 #include <linux/fs.h>
    7 
    8                 ssize_t test_direct_IO(struct kiocb *kiocb,
    9                     struct iov_iter *iter) { return 0; }
   10 
   11                 static const struct address_space_operations
   12                     aops __attribute__ ((unused)) = {
   13                         .direct_IO = test_direct_IO,
   14                 };
   15         ],[])
   16 
   17         ZFS_LINUX_TEST_SRC([direct_io_iter_offset], [
   18                 #include <linux/fs.h>
   19 
   20                 ssize_t test_direct_IO(struct kiocb *kiocb,
   21                     struct iov_iter *iter, loff_t offset) { return 0; }
   22 
   23                 static const struct address_space_operations
   24                     aops __attribute__ ((unused)) = {
   25                         .direct_IO = test_direct_IO,
   26                 };
   27         ],[])
   28 
   29         ZFS_LINUX_TEST_SRC([direct_io_iter_rw_offset], [
   30                 #include <linux/fs.h>
   31 
   32                 ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
   33                     struct iov_iter *iter, loff_t offset) { return 0; }
   34 
   35                 static const struct address_space_operations
   36                     aops __attribute__ ((unused)) = {
   37                     .direct_IO = test_direct_IO,
   38                 };
   39         ],[])
   40 
   41         ZFS_LINUX_TEST_SRC([direct_io_iovec], [
   42                 #include <linux/fs.h>
   43 
   44                 ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
   45                     const struct iovec *iov, loff_t offset,
   46                     unsigned long nr_segs) { return 0; }
   47 
   48                 static const struct address_space_operations
   49                     aops __attribute__ ((unused)) = {
   50                     .direct_IO = test_direct_IO,
   51                 };
   52         ],[])
   53 ])
   54 
   55 AC_DEFUN([ZFS_AC_KERNEL_VFS_DIRECT_IO], [
   56         dnl #
   57         dnl # Linux 4.6.x API change
   58         dnl #
   59         AC_MSG_CHECKING([whether aops->direct_IO() uses iov_iter])
   60         ZFS_LINUX_TEST_RESULT([direct_io_iter], [
   61                 AC_MSG_RESULT([yes])
   62                 AC_DEFINE(HAVE_VFS_DIRECT_IO_ITER, 1,
   63                     [aops->direct_IO() uses iov_iter without rw])
   64         ],[
   65                 AC_MSG_RESULT([no])
   66 
   67                 dnl #
   68                 dnl # Linux 4.1.x API change
   69                 dnl #
   70                 AC_MSG_CHECKING(
   71                     [whether aops->direct_IO() uses offset])
   72                 ZFS_LINUX_TEST_RESULT([direct_io_iter_offset], [
   73                         AC_MSG_RESULT([yes])
   74                         AC_DEFINE(HAVE_VFS_DIRECT_IO_ITER_OFFSET, 1,
   75                             [aops->direct_IO() uses iov_iter with offset])
   76 
   77                 ],[
   78                         AC_MSG_RESULT([no])
   79 
   80                         dnl #
   81                         dnl # Linux 3.16.x API change
   82                         dnl #
   83                         AC_MSG_CHECKING(
   84                             [whether aops->direct_IO() uses rw and offset])
   85                         ZFS_LINUX_TEST_RESULT([direct_io_iter_rw_offset], [
   86                                 AC_MSG_RESULT([yes])
   87                                 AC_DEFINE(HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET, 1,
   88                                     [aops->direct_IO() uses iov_iter with ]
   89                                     [rw and offset])
   90                         ],[
   91                                 AC_MSG_RESULT([no])
   92 
   93                                 dnl #
   94                                 dnl # Ancient Linux API (predates git)
   95                                 dnl #
   96                                 AC_MSG_CHECKING(
   97                                     [whether aops->direct_IO() uses iovec])
   98                                 ZFS_LINUX_TEST_RESULT([direct_io_iovec], [
   99                                         AC_MSG_RESULT([yes])
  100                                         AC_DEFINE(HAVE_VFS_DIRECT_IO_IOVEC, 1,
  101                                             [aops->direct_IO() uses iovec])
  102                                 ],[
  103                                         ZFS_LINUX_TEST_ERROR([direct IO])
  104                                         AC_MSG_RESULT([no])
  105                                 ])
  106                         ])
  107                 ])
  108         ])
  109 ])

Cache object: d3d20c7b3984e218587afec30a399540


[ 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.