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-tmpfile.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 # 3.11 API change
    3 dnl # Add support for i_op->tmpfile
    4 dnl #
    5 AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
    6         dnl #
    7         dnl # 6.1 API change
    8         dnl # use struct file instead of struct dentry
    9         dnl #
   10         ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
   11                 #include <linux/fs.h>
   12                 int tmpfile(struct user_namespace *userns,
   13                     struct inode *inode, struct file *file,
   14                     umode_t mode) { return 0; }
   15                 static struct inode_operations
   16                     iops __attribute__ ((unused)) = {
   17                         .tmpfile = tmpfile,
   18                 };
   19         ],[])
   20         dnl #
   21         dnl # 5.11 API change
   22         dnl # add support for userns parameter to tmpfile
   23         dnl #
   24         ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry_userns], [
   25                 #include <linux/fs.h>
   26                 int tmpfile(struct user_namespace *userns,
   27                     struct inode *inode, struct dentry *dentry,
   28                     umode_t mode) { return 0; }
   29                 static struct inode_operations
   30                     iops __attribute__ ((unused)) = {
   31                         .tmpfile = tmpfile,
   32                 };
   33         ],[])
   34         ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry], [
   35                         #include <linux/fs.h>
   36                         int tmpfile(struct inode *inode, struct dentry *dentry,
   37                             umode_t mode) { return 0; }
   38                         static struct inode_operations
   39                             iops __attribute__ ((unused)) = {
   40                                 .tmpfile = tmpfile,
   41                         };
   42         ],[])
   43 ])
   44 
   45 AC_DEFUN([ZFS_AC_KERNEL_TMPFILE], [
   46         AC_MSG_CHECKING([whether i_op->tmpfile() exists])
   47         ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [
   48                 AC_MSG_RESULT(yes)
   49                 AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
   50                 AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns])
   51         ],[
   52                 ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_dentry_userns], [
   53                         AC_MSG_RESULT(yes)
   54                         AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
   55                         AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns])
   56                         AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, [i_op->tmpfile() uses old dentry signature])
   57                 ],[
   58                         ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_dentry], [
   59                                 AC_MSG_RESULT(yes)
   60                                 AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
   61                                 AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, [i_op->tmpfile() uses old dentry signature])
   62                         ],[
   63                                 ZFS_LINUX_REQUIRE_API([i_op->tmpfile()], [3.11])
   64                         ])
   65                 ])
   66         ])
   67 ])

Cache object: 86e35315fc2b96574f54bf6c4c5bde44


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