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-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 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
    2         ZFS_LINUX_TEST_SRC([file_operations_iterate_shared], [
    3                 #include <linux/fs.h>
    4                 int iterate(struct file *filp, struct dir_context * context)
    5                     { return 0; }
    6 
    7                 static const struct file_operations fops
    8                     __attribute__ ((unused)) = {
    9                         .iterate_shared  = iterate,
   10                 };
   11         ],[])
   12 
   13         ZFS_LINUX_TEST_SRC([file_operations_iterate], [
   14                 #include <linux/fs.h>
   15                 int iterate(struct file *filp,
   16                     struct dir_context *context) { return 0; }
   17 
   18                 static const struct file_operations fops
   19                     __attribute__ ((unused)) = {
   20                         .iterate         = iterate,
   21                 };
   22 
   23                 #if defined(FMODE_KABI_ITERATE)
   24                 #error "RHEL 7.5, FMODE_KABI_ITERATE interface"
   25                 #endif
   26         ],[])
   27 
   28         ZFS_LINUX_TEST_SRC([file_operations_readdir], [
   29                 #include <linux/fs.h>
   30                 int readdir(struct file *filp, void *entry,
   31                     filldir_t func) { return 0; }
   32 
   33                 static const struct file_operations fops
   34                     __attribute__ ((unused)) = {
   35                         .readdir = readdir,
   36                 };
   37         ],[])
   38 ])
   39 
   40 AC_DEFUN([ZFS_AC_KERNEL_VFS_ITERATE], [
   41         dnl #
   42         dnl # 4.7 API change
   43         dnl #
   44         AC_MSG_CHECKING([whether fops->iterate_shared() is available])
   45         ZFS_LINUX_TEST_RESULT([file_operations_iterate_shared], [
   46                 AC_MSG_RESULT(yes)
   47                 AC_DEFINE(HAVE_VFS_ITERATE_SHARED, 1,
   48                     [fops->iterate_shared() is available])
   49         ],[
   50                 AC_MSG_RESULT(no)
   51 
   52                 dnl #
   53                 dnl # 3.11 API change
   54                 dnl #
   55                 dnl # RHEL 7.5 compatibility; the fops.iterate() method was
   56                 dnl # added to the file_operations structure but in order to
   57                 dnl # maintain KABI compatibility all callers must set
   58                 dnl # FMODE_KABI_ITERATE which is checked in iterate_dir().
   59                 dnl # When detected ignore this interface and fallback to
   60                 dnl # to using fops.readdir() to retain KABI compatibility.
   61                 dnl #
   62                 AC_MSG_CHECKING([whether fops->iterate() is available])
   63                 ZFS_LINUX_TEST_RESULT([file_operations_iterate], [
   64                         AC_MSG_RESULT(yes)
   65                         AC_DEFINE(HAVE_VFS_ITERATE, 1,
   66                             [fops->iterate() is available])
   67                 ],[
   68                         AC_MSG_RESULT(no)
   69 
   70                         dnl #
   71                         dnl # readdir interface introduced
   72                         dnl #
   73                         AC_MSG_CHECKING([whether fops->readdir() is available])
   74                         ZFS_LINUX_TEST_RESULT([file_operations_readdir], [
   75                                 AC_MSG_RESULT(yes)
   76                                 AC_DEFINE(HAVE_VFS_READDIR, 1,
   77                                     [fops->readdir() is available])
   78                         ],[
   79                                 ZFS_LINUX_TEST_ERROR([vfs_iterate])
   80                         ])
   81                 ])
   82         ])
   83 ])

Cache object: cdf53fa340892681a5c7aef69265e384


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