xref: /freebsd-src/sys/contrib/openzfs/config/kernel-commit-metadata.m4 (revision fd45b686f9d92f583366c75b22c04c7ee49709c0)
1eda14cbcSMatt Macydnl #
2eda14cbcSMatt Macydnl # 2.6.33 API change
3eda14cbcSMatt Macydnl # Added eops->commit_metadata() callback to allow the underlying
4eda14cbcSMatt Macydnl # filesystem to determine the most efficient way to commit the inode.
5eda14cbcSMatt Macydnl # Prior to this the nfs server would issue an explicit fsync().
6eda14cbcSMatt Macydnl #
7eda14cbcSMatt MacyAC_DEFUN([ZFS_AC_KERNEL_SRC_COMMIT_METADATA], [
8eda14cbcSMatt Macy	ZFS_LINUX_TEST_SRC([export_operations_commit_metadata], [
9eda14cbcSMatt Macy		#include <linux/exportfs.h>
10*fd45b686SMartin Matuska		static int commit_metadata(struct inode *inode) { return 0; }
11eda14cbcSMatt Macy		static struct export_operations eops __attribute__ ((unused))={
12eda14cbcSMatt Macy			.commit_metadata = commit_metadata,
13eda14cbcSMatt Macy		};
14eda14cbcSMatt Macy	],[])
15eda14cbcSMatt Macy])
16eda14cbcSMatt Macy
17eda14cbcSMatt MacyAC_DEFUN([ZFS_AC_KERNEL_COMMIT_METADATA], [
18eda14cbcSMatt Macy	AC_MSG_CHECKING([whether eops->commit_metadata() exists])
19eda14cbcSMatt Macy	ZFS_LINUX_TEST_RESULT([export_operations_commit_metadata], [
20eda14cbcSMatt Macy		AC_MSG_RESULT(yes)
21eda14cbcSMatt Macy	],[
22eda14cbcSMatt Macy		ZFS_LINUX_TEST_ERROR([eops->commit_metadata()])
23eda14cbcSMatt Macy	])
24eda14cbcSMatt Macy])
25