diff options
author | Richard Yao <[email protected]> | 2012-07-23 10:55:48 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-07-23 12:29:23 -0700 |
commit | 756c3e5a9ce36461939a8dc421918e1c3a379fa6 (patch) | |
tree | bca854f3c2e095cdd5a12b4dad61290872b69ffc /config/kernel-encode-fh-inode.m4 | |
parent | ed3fc80048f1d11f0b77382f5c378bb4c11787fd (diff) |
Linux 3.5 compat, eops->encode_fh() takes inodes
The export_operations member ->encode_fh() has been updated to
take both the child and parent inodes. This interface used to
take the child dentry and a bool describing if the parent is needed.
NOTE: While updating this code I noticed that we do not currently
cleanly handle the case where we're passed a connectable parent.
This code should be audited to make sure we're doing the right thing.
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #784
Diffstat (limited to 'config/kernel-encode-fh-inode.m4')
-rw-r--r-- | config/kernel-encode-fh-inode.m4 | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/config/kernel-encode-fh-inode.m4 b/config/kernel-encode-fh-inode.m4 new file mode 100644 index 000000000..287f62a5e --- /dev/null +++ b/config/kernel-encode-fh-inode.m4 @@ -0,0 +1,24 @@ +dnl # +dnl # 3.5.0 API change +dnl # torvalds/linux@b0b0382bb4904965a9e9fca77ad87514dfda0d1c changed the +dnl # ->encode_fh() callback to pass the child inode and its parents inode +dnl # rather than a dentry and a boolean saying whether we want the parent. +dnl # +AC_DEFUN([ZFS_AC_KERNEL_ENCODE_FH_WITH_INODE], [ + AC_MSG_CHECKING([whether eops->encode_fh() wants inode]) + ZFS_LINUX_TRY_COMPILE([ + #include <linux/exportfs.h> + int encode_fh(struct inode *inode, __u32 *fh, int *max_len, + struct inode *parent) { return 0; } + static struct export_operations eops __attribute__ ((unused))={ + .encode_fh = encode_fh, + }; + ],[ + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_ENCODE_FH_WITH_INODE, 1, + [eops->encode_fh() wants child and parent inodes]) + ],[ + AC_MSG_RESULT(no) + ]) +]) |