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-rw-iterate.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 # Linux 3.16 API
    3 dnl #
    4 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_RW_ITERATE], [
    5         ZFS_LINUX_TEST_SRC([file_operations_rw], [
    6                 #include <linux/fs.h>
    7 
    8                 ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
    9                     { return 0; }
   10                 ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
   11                     { return 0; }
   12 
   13                 static const struct file_operations
   14                     fops __attribute__ ((unused)) = {
   15                     .read_iter = test_read,
   16                     .write_iter = test_write,
   17                 };
   18         ],[])
   19 
   20         ZFS_LINUX_TEST_SRC([new_sync_rw], [
   21                 #include <linux/fs.h>
   22         ],[
   23                 ssize_t ret __attribute__ ((unused));
   24                 struct file *filp = NULL;
   25                 char __user *rbuf = NULL;
   26                 const char __user *wbuf = NULL;
   27                 size_t len = 0;
   28                 loff_t ppos;
   29 
   30                 ret = new_sync_read(filp, rbuf, len, &ppos);
   31                 ret = new_sync_write(filp, wbuf, len, &ppos);
   32         ])
   33 ])
   34 
   35 AC_DEFUN([ZFS_AC_KERNEL_VFS_RW_ITERATE], [
   36         AC_MSG_CHECKING([whether fops->read/write_iter() are available])
   37         ZFS_LINUX_TEST_RESULT([file_operations_rw], [
   38                 AC_MSG_RESULT(yes)
   39                 AC_DEFINE(HAVE_VFS_RW_ITERATE, 1,
   40                     [fops->read/write_iter() are available])
   41 
   42                 dnl #
   43                 dnl # Linux 4.1 API
   44                 dnl #
   45                 AC_MSG_CHECKING([whether new_sync_read/write() are available])
   46                 ZFS_LINUX_TEST_RESULT([new_sync_rw], [
   47                         AC_MSG_RESULT(yes)
   48                         AC_DEFINE(HAVE_NEW_SYNC_READ, 1,
   49                             [new_sync_read()/new_sync_write() are available])
   50                 ],[
   51                         AC_MSG_RESULT(no)
   52                 ])
   53         ],[
   54                 AC_MSG_RESULT(no)
   55         ])
   56 ])
   57 
   58 dnl #
   59 dnl # Linux 4.1.x API
   60 dnl #
   61 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_GENERIC_WRITE_CHECKS], [
   62         ZFS_LINUX_TEST_SRC([generic_write_checks], [
   63                 #include <linux/fs.h>
   64         ],[
   65                 struct kiocb *iocb = NULL;
   66                 struct iov_iter *iov = NULL;
   67                 generic_write_checks(iocb, iov);
   68         ])
   69 ])
   70 
   71 AC_DEFUN([ZFS_AC_KERNEL_VFS_GENERIC_WRITE_CHECKS], [
   72         AC_MSG_CHECKING([whether generic_write_checks() takes kiocb])
   73         ZFS_LINUX_TEST_RESULT([generic_write_checks], [
   74                 AC_MSG_RESULT(yes)
   75                 AC_DEFINE(HAVE_GENERIC_WRITE_CHECKS_KIOCB, 1,
   76                     [generic_write_checks() takes kiocb])
   77         ],[
   78                 AC_MSG_RESULT(no)
   79         ])
   80 ])

Cache object: 0dcedff80038decac028cbfc24d85310


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