1dnl # 2dnl # Check file_operations->fsync interface. 3dnl # 4AC_DEFUN([ZFS_AC_KERNEL_SRC_FSYNC], [ 5 ZFS_LINUX_TEST_SRC([fsync_without_dentry], [ 6 #include <linux/fs.h> 7 8 int test_fsync(struct file *f, int x) { return 0; } 9 10 static const struct file_operations 11 fops __attribute__ ((unused)) = { 12 .fsync = test_fsync, 13 }; 14 ],[]) 15 16 ZFS_LINUX_TEST_SRC([fsync_range], [ 17 #include <linux/fs.h> 18 19 int test_fsync(struct file *f, loff_t a, loff_t b, int c) 20 { return 0; } 21 22 static const struct file_operations 23 fops __attribute__ ((unused)) = { 24 .fsync = test_fsync, 25 }; 26 ],[]) 27]) 28 29AC_DEFUN([ZFS_AC_KERNEL_FSYNC], [ 30 dnl # 31 dnl # Linux 2.6.35 - Linux 3.0 API 32 dnl # 33 AC_MSG_CHECKING([whether fops->fsync() wants no dentry]) 34 ZFS_LINUX_TEST_RESULT([fsync_without_dentry], [ 35 AC_MSG_RESULT([yes]) 36 AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1, 37 [fops->fsync() without dentry]) 38 ],[ 39 AC_MSG_RESULT([no]) 40 41 dnl # 42 dnl # Linux 3.1 - 3.x API 43 dnl # 44 AC_MSG_CHECKING([whether fops->fsync() wants range]) 45 ZFS_LINUX_TEST_RESULT([fsync_range], [ 46 AC_MSG_RESULT([range]) 47 AC_DEFINE(HAVE_FSYNC_RANGE, 1, 48 [fops->fsync() with range]) 49 ],[ 50 ZFS_LINUX_TEST_ERROR([fops->fsync]) 51 ]) 52 ]) 53]) 54