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-get-link.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 # Supported get_link() interfaces checked newest to oldest.
    3 dnl # Note this interface used to be named follow_link.
    4 dnl #
    5 AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
    6         ZFS_LINUX_TEST_SRC([inode_operations_get_link], [
    7                 #include <linux/fs.h>
    8                 const char *get_link(struct dentry *de, struct inode *ip,
    9                     struct delayed_call *done) { return "symlink"; }
   10                 static struct inode_operations
   11                      iops __attribute__ ((unused)) = {
   12                         .get_link = get_link,
   13                 };
   14         ],[])
   15 
   16         ZFS_LINUX_TEST_SRC([inode_operations_get_link_cookie], [
   17                 #include <linux/fs.h>
   18                 const char *get_link(struct dentry *de, struct
   19                     inode *ip, void **cookie) { return "symlink"; }
   20                 static struct inode_operations
   21                      iops __attribute__ ((unused)) = {
   22                         .get_link = get_link,
   23                 };
   24         ],[])
   25 
   26         ZFS_LINUX_TEST_SRC([inode_operations_follow_link], [
   27                 #include <linux/fs.h>
   28                 const char *follow_link(struct dentry *de,
   29                     void **cookie) { return "symlink"; }
   30                 static struct inode_operations
   31                     iops __attribute__ ((unused)) = {
   32                         .follow_link = follow_link,
   33                 };
   34         ],[])
   35 
   36         ZFS_LINUX_TEST_SRC([inode_operations_follow_link_nameidata], [
   37                 #include <linux/fs.h>
   38                 void *follow_link(struct dentry *de, struct
   39                     nameidata *nd) { return (void *)NULL; }
   40                 static struct inode_operations
   41                     iops __attribute__ ((unused)) = {
   42                         .follow_link = follow_link,
   43                 };
   44         ],[])
   45 ])
   46 
   47 AC_DEFUN([ZFS_AC_KERNEL_GET_LINK], [
   48         dnl #
   49         dnl # 4.5 API change
   50         dnl # The get_link interface has added a delayed done call and
   51         dnl # used it to retire the put_link() interface.
   52         dnl #
   53         AC_MSG_CHECKING([whether iops->get_link() passes delayed])
   54         ZFS_LINUX_TEST_RESULT([inode_operations_get_link], [
   55                 AC_MSG_RESULT(yes)
   56                 AC_DEFINE(HAVE_GET_LINK_DELAYED, 1, [iops->get_link() delayed])
   57         ],[
   58                 AC_MSG_RESULT(no)
   59 
   60                 dnl #
   61                 dnl # 4.5 API change
   62                 dnl # The follow_link() interface has been replaced by
   63                 dnl # get_link() which behaves the same as before except:
   64                 dnl # - An inode is passed as a separate argument
   65                 dnl # - When called in RCU mode a NULL dentry is passed.
   66                 dnl #
   67                 AC_MSG_CHECKING([whether iops->get_link() passes cookie])
   68                 ZFS_LINUX_TEST_RESULT([inode_operations_get_link_cookie], [
   69                         AC_MSG_RESULT(yes)
   70                         AC_DEFINE(HAVE_GET_LINK_COOKIE, 1,
   71                             [iops->get_link() cookie])
   72                 ],[
   73                         AC_MSG_RESULT(no)
   74 
   75                         dnl #
   76                         dnl # 4.2 API change
   77                         dnl # This kernel retired the nameidata structure.
   78                         dnl #
   79                         AC_MSG_CHECKING(
   80                             [whether iops->follow_link() passes cookie])
   81                         ZFS_LINUX_TEST_RESULT([inode_operations_follow_link], [
   82                                 AC_MSG_RESULT(yes)
   83                                 AC_DEFINE(HAVE_FOLLOW_LINK_COOKIE, 1,
   84                                     [iops->follow_link() cookie])
   85                         ],[
   86                                 AC_MSG_RESULT(no)
   87 
   88                                 dnl #
   89                                 dnl # 2.6.32 API
   90                                 dnl #
   91                                 AC_MSG_CHECKING(
   92                                 [whether iops->follow_link() passes nameidata])
   93                                 ZFS_LINUX_TEST_RESULT(
   94                                     [inode_operations_follow_link_nameidata],[
   95                                         AC_MSG_RESULT(yes)
   96                                         AC_DEFINE(HAVE_FOLLOW_LINK_NAMEIDATA, 1,
   97                                             [iops->follow_link() nameidata])
   98                                 ],[
   99                                         ZFS_LINUX_TEST_ERROR([get_link])
  100                                 ])
  101                         ])
  102                 ])
  103         ])
  104 ])

Cache object: f8e603c3ec1340d1b314695e9fc6e854


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