summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-02-02 11:55:48 -0800
committerBrian Behlendorf <[email protected]>2012-02-03 10:02:01 -0800
commit47621f3d76abf63e178b95a446134565cc553b1a (patch)
tree327a3b8be057b8272ede19352e5f344dca5b52cf /config
parentd7e398ce1a3e6f9c705af43955a684685a798c32 (diff)
Linux 3.3 compat, sops->show_options()
The second argument of sops->show_options() was changed from a 'struct vfsmount *' to a 'struct dentry *'. Add an autoconf check to detect the API change and then conditionally define the expected interface. In either case we are only interested in the zfs_sb_t. Signed-off-by: Brian Behlendorf <[email protected]> Closes #549
Diffstat (limited to 'config')
-rw-r--r--config/kernel-show-options.m421
-rw-r--r--config/kernel.m41
2 files changed, 22 insertions, 0 deletions
diff --git a/config/kernel-show-options.m4 b/config/kernel-show-options.m4
new file mode 100644
index 000000000..1bddb0a7a
--- /dev/null
+++ b/config/kernel-show-options.m4
@@ -0,0 +1,21 @@
+dnl #
+dnl # Linux 3.3 API
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_SHOW_OPTIONS], [
+ AC_MSG_CHECKING([whether sops->show_options() wants dentry])
+
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ int (*show_options) (struct seq_file *, struct dentry *) = NULL;
+ struct super_operations sops __attribute__ ((unused));
+
+ sops.show_options = show_options;
+ ],[
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_SHOW_OPTIONS_WITH_DENTRY, 1,
+ [sops->show_options() with dentry])
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+])
diff --git a/config/kernel.m4 b/config/kernel.m4
index b986fe41b..10a2cdbcf 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -32,6 +32,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_CONST_XATTR_HANDLER
ZFS_AC_KERNEL_XATTR_HANDLER_GET
ZFS_AC_KERNEL_XATTR_HANDLER_SET
+ ZFS_AC_KERNEL_SHOW_OPTIONS
ZFS_AC_KERNEL_FSYNC
ZFS_AC_KERNEL_EVICT_INODE
ZFS_AC_KERNEL_NR_CACHED_OBJECTS