2011-02-11 19:58:55 +03:00
|
|
|
dnl #
|
2019-10-01 22:50:34 +03:00
|
|
|
dnl # Check file_operations->fsync interface.
|
2011-02-11 19:58:55 +03:00
|
|
|
dnl #
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_FSYNC], [
|
|
|
|
ZFS_LINUX_TEST_SRC([fsync_without_dentry], [
|
2011-11-10 08:47:59 +04:00
|
|
|
#include <linux/fs.h>
|
|
|
|
|
2013-02-15 03:54:04 +04:00
|
|
|
int test_fsync(struct file *f, int x) { return 0; }
|
|
|
|
|
|
|
|
static const struct file_operations
|
|
|
|
fops __attribute__ ((unused)) = {
|
|
|
|
.fsync = test_fsync,
|
|
|
|
};
|
2019-10-01 22:50:34 +03:00
|
|
|
],[])
|
2011-11-10 08:47:59 +04:00
|
|
|
|
2019-10-01 22:50:34 +03:00
|
|
|
ZFS_LINUX_TEST_SRC([fsync_range], [
|
2011-11-10 08:47:59 +04:00
|
|
|
#include <linux/fs.h>
|
|
|
|
|
2013-02-15 03:54:04 +04:00
|
|
|
int test_fsync(struct file *f, loff_t a, loff_t b, int c)
|
|
|
|
{ return 0; }
|
2012-05-31 07:25:31 +04:00
|
|
|
|
2013-02-15 03:54:04 +04:00
|
|
|
static const struct file_operations
|
|
|
|
fops __attribute__ ((unused)) = {
|
|
|
|
.fsync = test_fsync,
|
|
|
|
};
|
2019-10-01 22:50:34 +03:00
|
|
|
],[])
|
2012-05-31 07:25:31 +04:00
|
|
|
])
|
|
|
|
|
2011-11-10 08:47:59 +04:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_FSYNC], [
|
2019-10-01 22:50:34 +03:00
|
|
|
dnl #
|
2019-11-12 19:59:06 +03:00
|
|
|
dnl # Linux 2.6.35 - Linux 3.0 API
|
2019-10-01 22:50:34 +03:00
|
|
|
dnl #
|
2019-11-12 19:59:06 +03:00
|
|
|
AC_MSG_CHECKING([whether fops->fsync() wants no dentry])
|
|
|
|
ZFS_LINUX_TEST_RESULT([fsync_without_dentry], [
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_MSG_RESULT([yes])
|
2019-11-12 19:59:06 +03:00
|
|
|
AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1,
|
|
|
|
[fops->fsync() without dentry])
|
2019-10-01 22:50:34 +03:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
|
|
|
|
dnl #
|
2019-11-12 19:59:06 +03:00
|
|
|
dnl # Linux 3.1 - 3.x API
|
2019-10-01 22:50:34 +03:00
|
|
|
dnl #
|
2019-11-12 19:59:06 +03:00
|
|
|
AC_MSG_CHECKING([whether fops->fsync() wants range])
|
|
|
|
ZFS_LINUX_TEST_RESULT([fsync_range], [
|
|
|
|
AC_MSG_RESULT([range])
|
|
|
|
AC_DEFINE(HAVE_FSYNC_RANGE, 1,
|
|
|
|
[fops->fsync() with range])
|
2019-10-01 22:50:34 +03:00
|
|
|
],[
|
2019-11-12 19:59:06 +03:00
|
|
|
ZFS_LINUX_TEST_ERROR([fops->fsync])
|
2019-10-01 22:50:34 +03:00
|
|
|
])
|
|
|
|
])
|
2011-11-10 08:47:59 +04:00
|
|
|
])
|