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-fallocate.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 2.6.38 - 3.x API
    3 dnl # The fallocate callback was moved from the inode_operations
    4 dnl # structure to the file_operations structure.
    5 dnl #
    6 dnl #
    7 dnl # Linux 3.15+
    8 dnl # fallocate learned a new flag, FALLOC_FL_ZERO_RANGE
    9 dnl #
   10 AC_DEFUN([ZFS_AC_KERNEL_SRC_FALLOCATE], [
   11         ZFS_LINUX_TEST_SRC([file_fallocate], [
   12                 #include <linux/fs.h>
   13 
   14                 long test_fallocate(struct file *file, int mode,
   15                     loff_t offset, loff_t len) { return 0; }
   16 
   17                 static const struct file_operations
   18                     fops __attribute__ ((unused)) = {
   19                         .fallocate = test_fallocate,
   20                 };
   21         ], [])
   22         ZFS_LINUX_TEST_SRC([falloc_fl_zero_range], [
   23                 #include <linux/falloc.h>
   24         ],[
   25                 int flags __attribute__ ((unused));
   26                 flags = FALLOC_FL_ZERO_RANGE;
   27         ])
   28 ])
   29 
   30 AC_DEFUN([ZFS_AC_KERNEL_FALLOCATE], [
   31         AC_MSG_CHECKING([whether fops->fallocate() exists])
   32         ZFS_LINUX_TEST_RESULT([file_fallocate], [
   33                 AC_MSG_RESULT(yes)
   34                 AC_MSG_CHECKING([whether FALLOC_FL_ZERO_RANGE exists])
   35                 ZFS_LINUX_TEST_RESULT([falloc_fl_zero_range], [
   36                         AC_MSG_RESULT(yes)
   37                         AC_DEFINE(HAVE_FALLOC_FL_ZERO_RANGE, 1, [FALLOC_FL_ZERO_RANGE is defined])
   38                 ],[
   39                         AC_MSG_RESULT(no)
   40                 ])
   41         ],[
   42                 ZFS_LINUX_TEST_ERROR([file_fallocate])
   43         ])
   44 ])

Cache object: e6255577926cc7fa82b29b0d5e8f7500


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