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