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-inode-getattr.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_INODE_GETATTR], [
    2         dnl #
    3         dnl # Linux 5.12 API
    4         dnl # The getattr I/O operations handler type was extended to require
    5         dnl # a struct user_namespace* as its first arg, to support idmapped
    6         dnl # mounts.
    7         dnl #
    8         ZFS_LINUX_TEST_SRC([inode_operations_getattr_userns], [
    9                 #include <linux/fs.h>
   10 
   11                 int test_getattr(
   12                         struct user_namespace *userns,
   13                     const struct path *p, struct kstat *k,
   14                     u32 request_mask, unsigned int query_flags)
   15                     { return 0; }
   16 
   17                 static const struct inode_operations
   18                     iops __attribute__ ((unused)) = {
   19                         .getattr = test_getattr,
   20                 };
   21         ],[])
   22 
   23         dnl #
   24         dnl # Linux 4.11 API
   25         dnl # See torvalds/linux@a528d35
   26         dnl #
   27         ZFS_LINUX_TEST_SRC([inode_operations_getattr_path], [
   28                 #include <linux/fs.h>
   29 
   30                 int test_getattr(
   31                     const struct path *p, struct kstat *k,
   32                     u32 request_mask, unsigned int query_flags)
   33                     { return 0; }
   34 
   35                 static const struct inode_operations
   36                     iops __attribute__ ((unused)) = {
   37                         .getattr = test_getattr,
   38                 };
   39         ],[])
   40 
   41         ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [
   42                 #include <linux/fs.h>
   43 
   44                 int test_getattr(
   45                     struct vfsmount *mnt, struct dentry *d,
   46                     struct kstat *k)
   47                     { return 0; }
   48 
   49                 static const struct inode_operations
   50                     iops __attribute__ ((unused)) = {
   51                         .getattr = test_getattr,
   52                 };
   53         ],[])
   54 ])
   55 
   56 AC_DEFUN([ZFS_AC_KERNEL_INODE_GETATTR], [
   57         dnl #
   58         dnl # Kernel 5.12 test
   59         dnl #
   60         AC_MSG_CHECKING([whether iops->getattr() takes user_namespace])
   61         ZFS_LINUX_TEST_RESULT([inode_operations_getattr_userns], [
   62                 AC_MSG_RESULT(yes)
   63                 AC_DEFINE(HAVE_USERNS_IOPS_GETATTR, 1,
   64                     [iops->getattr() takes struct user_namespace*])
   65         ],[
   66                 AC_MSG_RESULT(no)
   67 
   68                 dnl #
   69                 dnl # Kernel 4.11 test
   70                 dnl #
   71                 AC_MSG_CHECKING([whether iops->getattr() takes a path])
   72                 ZFS_LINUX_TEST_RESULT([inode_operations_getattr_path], [
   73                         AC_MSG_RESULT(yes)
   74                         AC_DEFINE(HAVE_PATH_IOPS_GETATTR, 1,
   75                                 [iops->getattr() takes a path])
   76                 ],[
   77                         AC_MSG_RESULT(no)
   78 
   79                         dnl #
   80                         dnl # Kernel < 4.11 test
   81                         dnl #
   82                         AC_MSG_CHECKING([whether iops->getattr() takes a vfsmount])
   83                         ZFS_LINUX_TEST_RESULT([inode_operations_getattr_vfsmount], [
   84                                 AC_MSG_RESULT(yes)
   85                                 AC_DEFINE(HAVE_VFSMOUNT_IOPS_GETATTR, 1,
   86                                         [iops->getattr() takes a vfsmount])
   87                         ],[
   88                                 AC_MSG_RESULT(no)
   89                         ])
   90                 ])
   91         ])
   92 ])

Cache object: 1c60d5c4928988e3be2e134e1cfc79e3


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