]> git.proxmox.com Git - mirror_zfs-debian.git/commitdiff
Imported Upstream version 0.6.5.5
authorAron Xu <aron@debian.org>
Sun, 20 Mar 2016 14:56:48 +0000 (22:56 +0800)
committerAron Xu <aron@debian.org>
Sun, 20 Mar 2016 14:56:48 +0000 (22:56 +0800)
102 files changed:
META
Makefile.in
aclocal.m4
cmd/Makefile.in
cmd/arc_summary/Makefile.in
cmd/arc_summary/arc_summary.py
cmd/arcstat/Makefile.in
cmd/dbufstat/Makefile.in
cmd/dbufstat/dbufstat.py
cmd/fsck_zfs/Makefile.in
cmd/mount_zfs/Makefile.in
cmd/mount_zfs/mount_zfs.c
cmd/vdev_id/Makefile.in
cmd/zdb/Makefile.in
cmd/zed/Makefile.in
cmd/zfs/Makefile.in
cmd/zhack/Makefile.in
cmd/zinject/Makefile.in
cmd/zpios/Makefile.in
cmd/zpool/Makefile.in
cmd/zstreamdump/Makefile.in
cmd/ztest/Makefile.in
cmd/zvol_id/Makefile.in
config/kernel-follow-link-nameidata.m4 [deleted file]
config/kernel-get-link.m4 [new file with mode: 0644]
config/kernel-put-link-nameidata.m4 [deleted file]
config/kernel-put-link.m4 [new file with mode: 0644]
config/kernel-xattr-handler.m4
config/kernel.m4
configure
contrib/Makefile.in
contrib/bash_completion.d/Makefile.in
contrib/dracut/90zfs/Makefile.in
contrib/dracut/Makefile.in
contrib/initramfs/Makefile.in
etc/Makefile.in
etc/init.d/Makefile.in
etc/modules-load.d/Makefile.in
etc/systemd/Makefile.in
etc/systemd/system/Makefile.in
etc/zfs/Makefile.in
include/Makefile.in
include/linux/Makefile.in
include/linux/xattr_compat.h
include/sys/Makefile.in
include/sys/fm/Makefile.in
include/sys/fm/fs/Makefile.in
include/sys/fs/Makefile.in
include/sys/sa.h
include/sys/zfs_vfsops.h
include/sys/zfs_znode.h
lib/Makefile.in
lib/libavl/Makefile.in
lib/libefi/Makefile.in
lib/libnvpair/Makefile.in
lib/libshare/Makefile.in
lib/libspl/Makefile.in
lib/libspl/asm-generic/Makefile.in
lib/libspl/asm-i386/Makefile.in
lib/libspl/asm-x86_64/Makefile.in
lib/libspl/include/Makefile.in
lib/libspl/include/ia32/Makefile.in
lib/libspl/include/ia32/sys/Makefile.in
lib/libspl/include/rpc/Makefile.in
lib/libspl/include/sys/Makefile.in
lib/libspl/include/sys/dktp/Makefile.in
lib/libspl/include/sys/sysevent/Makefile.in
lib/libspl/include/sys/types.h
lib/libspl/include/util/Makefile.in
lib/libunicode/Makefile.in
lib/libuutil/Makefile.in
lib/libzfs/Makefile.in
lib/libzfs/libzfs.pc
lib/libzfs/libzfs_core.pc
lib/libzfs/libzfs_sendrecv.c
lib/libzfs_core/Makefile.in
lib/libzpool/Makefile.in
man/Makefile.in
man/man1/Makefile.in
man/man5/Makefile.in
man/man8/Makefile.in
module/zfs/arc.c
module/zfs/sa.c
module/zfs/zfs_sa.c
module/zfs/zfs_vfsops.c
module/zfs/zfs_znode.c
module/zfs/zpl_inode.c
module/zfs/zpl_xattr.c
rpm/Makefile.in
rpm/generic/Makefile.in
rpm/generic/zfs-kmod.spec.in
rpm/generic/zfs.spec.in
rpm/redhat/Makefile.in
rpm/redhat/zfs-kmod.spec.in
rpm/redhat/zfs.spec.in
scripts/Makefile.in
scripts/zpios-profile/Makefile.in
scripts/zpios-test/Makefile.in
scripts/zpool-config/Makefile.in
udev/Makefile.in
udev/rules.d/Makefile.in
zfs_config.h.in

diff --git a/META b/META
index c8865df89179050f3f01d3420154ea298c8de009..ea5d64457a29aeef005a8d37a0805fe9989f385f 100644 (file)
--- a/META
+++ b/META
@@ -1,7 +1,7 @@
 Meta:         1
 Name:         zfs
 Branch:       1.0
-Version:      0.6.5.4
+Version:      0.6.5.5
 Release:      1
 Release-Tags: relext
 License:      CDDL
index 439b17c60bb304272c745319c3ef8fbd5ccfe87b..c85d874fdaa01307325b4a66998646c77ef7572b 100644 (file)
@@ -99,11 +99,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -116,7 +116,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 2cce6fa7d66f483c18688956f840a7200fd1ca37..6e9725724b425689d7be9d610938c43438642af5 100644 (file)
@@ -1126,11 +1126,11 @@ m4_include([config/kernel-fallocate.m4])
 m4_include([config/kernel-file-inode.m4])
 m4_include([config/kernel-fmode-t.m4])
 m4_include([config/kernel-follow-down-one.m4])
-m4_include([config/kernel-follow-link-nameidata.m4])
 m4_include([config/kernel-fsync.m4])
 m4_include([config/kernel-generic_io_acct.m4])
 m4_include([config/kernel-get-disk-ro.m4])
 m4_include([config/kernel-get-gendisk.m4])
+m4_include([config/kernel-get-link.m4])
 m4_include([config/kernel-insert-inode-locked.m4])
 m4_include([config/kernel-invalidate-bdev-args.m4])
 m4_include([config/kernel-is_owner_or_cap.m4])
@@ -1143,7 +1143,7 @@ m4_include([config/kernel-mk-request-fn.m4])
 m4_include([config/kernel-mkdir-umode-t.m4])
 m4_include([config/kernel-mount-nodev.m4])
 m4_include([config/kernel-open-bdev-exclusive.m4])
-m4_include([config/kernel-put-link-nameidata.m4])
+m4_include([config/kernel-put-link.m4])
 m4_include([config/kernel-security-inode-init.m4])
 m4_include([config/kernel-set-nlink.m4])
 m4_include([config/kernel-sget-args.m4])
index a3fbb7cfcab98eae532106a92908340e45b06ee0..4d9f316af3482375e80e20d6dab40fea2c23339f 100644 (file)
@@ -75,11 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 56633bbc2ccf4c46d17e2a2f205d43ef7469ec47..430e21e2a550ad40b50de83c0b2c7175c3689d7a 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 25238f39ecdad535903dd2991daf86cd09a43886..65b5c4dbd02f291e9a9bbda5c22ce3030792c54d 100755 (executable)
@@ -94,7 +94,7 @@ def get_Kstat():
 
 def div1():
     sys.stdout.write("\n")
-    for i in xrange(18):
+    for i in range(18):
         sys.stdout.write("%s" % "----")
     sys.stdout.write("\n")
 
@@ -1060,7 +1060,7 @@ def _tunable_summary(Kstat):
         if alternate_tunable_layout:
             format = "\t%s=%s\n"
 
-        if show_tunable_descriptions and descriptions.has_key(name):
+        if show_tunable_descriptions and name in descriptions:
             sys.stdout.write("\t# %s\n" % descriptions[name])
 
         sys.stdout.write(format % (name, values[name]))
@@ -1132,7 +1132,7 @@ def main():
     if 'p' in args:
         try:
             pages.append(unSub[int(args['p']) - 1])
-        except IndexError , e:
+        except IndexError as e:
             sys.stderr.write('the argument to -p must be between 1 and ' +
                     str(len(unSub)) + '\n')
             sys.exit()
index 3ca55ff70256480400f7c38efeedd777cd794827..a146a63cc329768fef592afb4af1dc046bb1ceeb 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index fa07c3ef893db7bf7b23ff59dcf8ab4cffbf05a3..a72144c949c795f7b0437477a971ce7d39dff9a7 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 0640b0f5bbf98ec8c676253c861150c7921681c5..0bda1524e9e2ce21a1ee767287501880e720aa44 100755 (executable)
@@ -386,9 +386,9 @@ def update_dict(d, k, line, labels):
 
 def print_dict(d):
     print_header()
-    for pool in d.keys():
-        for objset in d[pool].keys():
-            for v in d[pool][objset].values():
+    for pool in list(d.keys()):
+        for objset in list(d[pool].keys()):
+            for v in list(d[pool][objset].values()):
                 print_values(v)
 
 
index ee9738d537618ea7320005fcda978484ceafe3ba..8ee90cd6f9469f2fdd876ebbc7f1481cfb6d74af 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index e633e03f67d16e4b6398c39688694623c1731755..282fac7a14fbf77d4304aee4d77e4f7c93511ae3 100644 (file)
@@ -78,11 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index af589bbc7c0b6079a9956db95282179973dc2d82..bd860cb2e55cd7d5f2dacf8bcac5836fdd1ee785 100644 (file)
@@ -32,6 +32,7 @@
 #include <sys/stat.h>
 #include <libzfs.h>
 #include <locale.h>
+#include <getopt.h>
 
 #define        ZS_COMMENT      0x00000000      /* comment */
 #define        ZS_ZFSUTIL      0x00000001      /* caller is zfs(8) */
@@ -389,7 +390,7 @@ main(int argc, char **argv)
        opterr = 0;
 
        /* check options */
-       while ((c = getopt(argc, argv, "sfnvo:h?")) != -1) {
+       while ((c = getopt_long(argc, argv, "sfnvo:h?", 0, 0)) != -1) {
                switch (c) {
                case 's':
                        sloppy = 1;
index deddd3f332eb2c5f9e7551f7ba0c4b1d16eddb60..f1cbea92791b2e7b14877d18e9313f27a9b1e855 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index fe47ffafdceecda1f28fdaee482269394f83cc5f..dba5e3b12ea87142e018adc53388f8a4a09a373e 100644 (file)
@@ -78,11 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index ae06dc6f902acab7b3866860a45634345bd5da59..408cfcf1c59f06c26bc3b5cc6cb4bc11b2eae250 100644 (file)
@@ -81,11 +81,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -98,7 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 0ae5dcf9efb1db1a3b2b4c6f864a2a06720d4a73..bd1cb8823c1aabbd65165a87b555a3f19525b308 100644 (file)
@@ -78,11 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 3ec4ca9ef7823ef8f32942aebc7bd26efe9e4df5..ffd3cc0b5343164a46539b918d01118cc4d25f9e 100644 (file)
@@ -78,11 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index ed4603e3f7a763b9309459963f7e9c0fbb505826..efd771770dfba030473e08faafcae5409ccfcd67 100644 (file)
@@ -78,11 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 221d30a944b49e2ad819cf6f3c1fe5730f16d7b2..e9b95018b1c11545c27372a28fe06965390a4b69 100644 (file)
@@ -78,11 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index d7acc0e726c6ff8170adb7f6d3200a7e76349a99..1b221ca7b2cd36b9005b5461d4c9dbc99323d444 100644 (file)
@@ -78,11 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 76961d9620c4014ca846ef96c46c249188096aee..c2b21965cf433cd1d45266d4311a23cce025fd48 100644 (file)
@@ -78,11 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 306e8f960896780ae02e1dccff1653420ac3f35d..42da33b067244bf4370e716ec035edbb0533ac97 100644 (file)
@@ -78,11 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index cc1159f48a59be3a1a9cb2f1e022f389c8f1b3ec..ce8d9522d3471976d0ff1aa78f1cd3b429fee873 100644 (file)
@@ -78,11 +78,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -95,7 +95,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
diff --git a/config/kernel-follow-link-nameidata.m4 b/config/kernel-follow-link-nameidata.m4
deleted file mode 100644 (file)
index 88c85ac..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-dnl #
-dnl # 4.2 API change
-dnl # This kernel retired the nameidata structure which forced the
-dnl # restructuring of the follow_link() prototype and how it is called.
-dnl # We check for the new interface rather than detecting the old one.
-dnl #
-AC_DEFUN([ZFS_AC_KERNEL_FOLLOW_LINK], [
-       AC_MSG_CHECKING([whether iops->follow_link() passes nameidata])
-       ZFS_LINUX_TRY_COMPILE([
-               #include <linux/fs.h>
-               const char *follow_link(struct dentry *de, void **cookie)
-                   { return "symlink"; }
-               static struct inode_operations iops __attribute__ ((unused)) = {
-                       .follow_link = follow_link,
-               };
-       ],[
-       ],[
-               AC_MSG_RESULT(no)
-       ],[
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_FOLLOW_LINK_NAMEIDATA, 1,
-                         [iops->follow_link() nameidata])
-       ])
-])
diff --git a/config/kernel-get-link.m4 b/config/kernel-get-link.m4
new file mode 100644 (file)
index 0000000..022c49c
--- /dev/null
@@ -0,0 +1,100 @@
+dnl #
+dnl # Supported get_link() interfaces checked newest to oldest.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_FOLLOW_LINK], [
+       dnl #
+       dnl # 4.2 API change
+       dnl # - This kernel retired the nameidata structure.
+       dnl #
+       AC_MSG_CHECKING([whether iops->follow_link() passes cookie])
+       ZFS_LINUX_TRY_COMPILE([
+               #include <linux/fs.h>
+               const char *follow_link(struct dentry *de,
+                   void **cookie) { return "symlink"; }
+               static struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .follow_link = follow_link,
+               };
+       ],[
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_FOLLOW_LINK_COOKIE, 1,
+                   [iops->follow_link() cookie])
+       ],[
+               dnl #
+               dnl # 2.6.32 API
+               dnl #
+               AC_MSG_RESULT(no)
+               AC_MSG_CHECKING(
+                  [whether iops->follow_link() passes nameidata])
+               ZFS_LINUX_TRY_COMPILE([
+               #include <linux/fs.h>
+                       void *follow_link(struct dentry *de, struct
+                           nameidata *nd) { return (void *)NULL; }
+                       static struct inode_operations
+                           iops __attribute__ ((unused)) = {
+                               .follow_link = follow_link,
+                       };
+               ],[
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_FOLLOW_LINK_NAMEIDATA, 1,
+                                 [iops->follow_link() nameidata])
+               ],[
+                        AC_MSG_ERROR(no; please file a bug report)
+               ])
+       ])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_GET_LINK], [
+       dnl #
+       dnl # 4.5 API change
+       dnl # The get_link interface has added a delayed done call and
+       dnl # used it to retire the put_link() interface.
+       dnl #
+       AC_MSG_CHECKING([whether iops->get_link() passes delayed])
+       ZFS_LINUX_TRY_COMPILE([
+               #include <linux/fs.h>
+               const char *get_link(struct dentry *de, struct inode *ip,
+                   struct delayed_call *done) { return "symlink"; }
+               static struct inode_operations
+                    iops __attribute__ ((unused)) = {
+                       .get_link = get_link,
+               };
+       ],[
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_GET_LINK_DELAYED, 1,
+                   [iops->get_link() delayed])
+       ],[
+               dnl #
+               dnl # 4.5 API change
+               dnl # The follow_link() interface has been replaced by
+               dnl # get_link() which behaves the same as before except:
+               dnl # - An inode is passed as a separate argument
+               dnl # - When called in RCU mode a NULL dentry is passed.
+               dnl #
+               AC_MSG_RESULT(no)
+               AC_MSG_CHECKING([whether iops->get_link() passes cookie])
+               ZFS_LINUX_TRY_COMPILE([
+                       #include <linux/fs.h>
+                       const char *get_link(struct dentry *de, struct
+                           inode *ip, void **cookie) { return "symlink"; }
+                       static struct inode_operations
+                            iops __attribute__ ((unused)) = {
+                               .get_link = get_link,
+                       };
+               ],[
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_GET_LINK_COOKIE, 1,
+                           [iops->get_link() cookie])
+               ],[
+                       dnl #
+                       dnl # Check for the follow_link APIs.
+                       dnl #
+                       AC_MSG_RESULT(no)
+                       ZFS_AC_KERNEL_FOLLOW_LINK
+               ])
+       ])
+])
diff --git a/config/kernel-put-link-nameidata.m4 b/config/kernel-put-link-nameidata.m4
deleted file mode 100644 (file)
index 0181ae5..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-dnl #
-dnl # 4.2 API change
-dnl # This kernel retired the nameidata structure which forced the
-dnl # restructuring of the put_link() prototype and how it is called.
-dnl # We check for the new interface rather than detecting the old one.
-dnl #
-AC_DEFUN([ZFS_AC_KERNEL_PUT_LINK], [
-       AC_MSG_CHECKING([whether iops->put_link() passes nameidata])
-       ZFS_LINUX_TRY_COMPILE([
-               #include <linux/fs.h>
-               void put_link(struct inode *ip, void *cookie) { return; }
-               static struct inode_operations iops __attribute__ ((unused)) = {
-                       .put_link = put_link,
-               };
-       ],[
-       ],[
-               AC_MSG_RESULT(no)
-       ],[
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_PUT_LINK_NAMEIDATA, 1,
-                         [iops->put_link() nameidata])
-       ])
-])
diff --git a/config/kernel-put-link.m4 b/config/kernel-put-link.m4
new file mode 100644 (file)
index 0000000..a0bb36e
--- /dev/null
@@ -0,0 +1,60 @@
+dnl #
+dnl # Supported symlink APIs
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_PUT_LINK], [
+       dnl #
+       dnl # 4.5 API change
+       dnl # get_link() uses delayed done, there is no put_link() interface.
+       dnl #
+       ZFS_LINUX_TRY_COMPILE([
+               #if !defined(HAVE_GET_LINK_DELAYED)
+               #error "Expecting get_link() delayed done"
+               #endif
+       ],[
+       ],[
+               AC_DEFINE(HAVE_PUT_LINK_DELAYED, 1, [iops->put_link() delayed])
+       ],[
+               dnl #
+               dnl # 4.2 API change
+               dnl # This kernel retired the nameidata structure.
+               dnl #
+               AC_MSG_CHECKING([whether iops->put_link() passes cookie])
+               ZFS_LINUX_TRY_COMPILE([
+                       #include <linux/fs.h>
+                       void put_link(struct inode *ip, void *cookie)
+                           { return; }
+                       static struct inode_operations
+                           iops __attribute__ ((unused)) = {
+                               .put_link = put_link,
+                       };
+               ],[
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_PUT_LINK_COOKIE, 1,
+                           [iops->put_link() cookie])
+               ],[
+                       dnl #
+                       dnl # 2.6.32 API
+                       dnl #
+                       AC_MSG_RESULT(no)
+                       AC_MSG_CHECKING(
+                           [whether iops->put_link() passes nameidata])
+                       ZFS_LINUX_TRY_COMPILE([
+                               #include <linux/fs.h>
+                               void put_link(struct dentry *de, struct
+                                   nameidata *nd, void *ptr) { return; }
+                               static struct inode_operations
+                                   iops __attribute__ ((unused)) = {
+                                       .put_link = put_link,
+                               };
+                       ],[
+                       ],[
+                               AC_MSG_RESULT(yes)
+                               AC_DEFINE(HAVE_PUT_LINK_NAMEIDATA, 1,
+                                   [iops->put_link() nameidata])
+                       ],[
+                               AC_MSG_ERROR(no; please file a bug report)
+                       ])
+               ])
+       ])
+])
index d79a6e47bc0081ffde4bc1a899131197bddb15a7..e1881f68ba83c5f9b875e44fc77b6a5bd3a01331 100644 (file)
@@ -3,8 +3,8 @@ dnl # 2.6.35 API change,
 dnl # The 'struct xattr_handler' was constified in the generic
 dnl # super_block structure.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_CONST_XATTR_HANDLER],
-       [AC_MSG_CHECKING([whether super_block uses const struct xattr_hander])
+AC_DEFUN([ZFS_AC_KERNEL_CONST_XATTR_HANDLER], [
+       AC_MSG_CHECKING([whether super_block uses const struct xattr_handler])
        ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
                #include <linux/xattr.h>
@@ -26,29 +26,29 @@ AC_DEFUN([ZFS_AC_KERNEL_CONST_XATTR_HANDLER],
        ],[
                AC_MSG_RESULT([yes])
                AC_DEFINE(HAVE_CONST_XATTR_HANDLER, 1,
-                         [super_block uses const struct xattr_hander])
+                         [super_block uses const struct xattr_handler])
        ],[
                AC_MSG_RESULT([no])
        ])
 ])
 
 dnl #
-dnl # 2.6.33 API change,
-dnl # The xattr_hander->get() callback was changed to take a dentry
-dnl # instead of an inode, and a handler_flags argument was added.
-dnl #
-dnl # 4.4 API change,
-dnl # The xattr_hander->get() callback was changed to take a xattr_handler,
-dnl # and handler_flags argument was removed and should be accessed by
-dnl # handler->flags.
+dnl # Supported xattr handler get() interfaces checked newest to oldest.
 dnl #
 AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [
-       AC_MSG_CHECKING([whether xattr_handler->get() wants dentry])
+       dnl #
+       dnl # 4.4 API change,
+       dnl # The xattr_handler->get() callback was changed to take a
+       dnl # attr_handler, and handler_flags argument was removed and
+       dnl # should be accessed by handler->flags.
+       dnl #
+       AC_MSG_CHECKING([whether xattr_handler->get() wants xattr_handler])
        ZFS_LINUX_TRY_COMPILE([
                #include <linux/xattr.h>
 
-               int get(struct dentry *dentry, const char *name,
-                   void *buffer, size_t size, int handler_flags) { return 0; }
+               int get(const struct xattr_handler *handler,
+                   struct dentry *dentry, const char *name,
+                   void *buffer, size_t size) { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
                        .get = get,
@@ -56,16 +56,23 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [
        ],[
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_DENTRY_XATTR_GET, 1,
-                   [xattr_handler->get() wants dentry])
+               AC_DEFINE(HAVE_XATTR_GET_HANDLER, 1,
+                   [xattr_handler->get() wants xattr_handler])
        ],[
+               dnl #
+               dnl # 2.6.33 API change,
+               dnl # The xattr_handler->get() callback was changed to take
+               dnl # a dentry instead of an inode, and a handler_flags
+               dnl # argument was added.
+               dnl #
                AC_MSG_RESULT(no)
-               AC_MSG_CHECKING([whether xattr_handler->get() wants xattr_handler])
+               AC_MSG_CHECKING([whether xattr_handler->get() wants dentry])
                ZFS_LINUX_TRY_COMPILE([
                        #include <linux/xattr.h>
 
-                       int get(const struct xattr_handler *handler, struct dentry *dentry,
-                           const char *name, void *buffer, size_t size) { return 0; }
+                       int get(struct dentry *dentry, const char *name,
+                           void *buffer, size_t size, int handler_flags)
+                           { return 0; }
                        static const struct xattr_handler
                            xops __attribute__ ((unused)) = {
                                .get = get,
@@ -73,32 +80,54 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [
                ],[
                ],[
                        AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_HANDLER_XATTR_GET, 1,
-                           [xattr_handler->get() wants xattr_handler])
+                       AC_DEFINE(HAVE_XATTR_GET_DENTRY, 1,
+                           [xattr_handler->get() wants dentry])
                ],[
+                       dnl #
+                       dnl # 2.6.32 API
+                       dnl #
                        AC_MSG_RESULT(no)
+                       AC_MSG_CHECKING(
+                           [whether xattr_handler->get() wants inode])
+                       ZFS_LINUX_TRY_COMPILE([
+                               #include <linux/xattr.h>
+
+                               int get(struct inode *ip, const char *name,
+                                   void *buffer, size_t size) { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .get = get,
+                               };
+                       ],[
+                       ],[
+                               AC_MSG_RESULT(yes)
+                               AC_DEFINE(HAVE_XATTR_GET_INODE, 1,
+                                   [xattr_handler->get() wants inode])
+                       ],[
+                               AC_MSG_ERROR([no; please file a bug report])
+                       ])
                ])
        ])
 ])
 
 dnl #
-dnl # 2.6.33 API change,
-dnl # The xattr_hander->set() callback was changed to take a dentry
-dnl # instead of an inode, and a handler_flags argument was added.
-dnl #
-dnl # 4.4 API change,
-dnl # The xattr_hander->set() callback was changed to take a xattr_handler,
-dnl # and handler_flags argument was removed and should be accessed by
-dnl # handler->flags.
+dnl # Supported xattr handler set() interfaces checked newest to oldest.
 dnl #
 AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_SET], [
-       AC_MSG_CHECKING([whether xattr_handler->set() wants dentry])
+       dnl #
+       dnl # 4.4 API change,
+       dnl # The xattr_handler->set() callback was changed to take a
+       dnl # xattr_handler, and handler_flags argument was removed and
+       dnl # should be accessed by handler->flags.
+       dnl #
+       AC_MSG_CHECKING([whether xattr_handler->set() wants xattr_handler])
        ZFS_LINUX_TRY_COMPILE([
                #include <linux/xattr.h>
 
-               int set(struct dentry *dentry, const char *name,
-                   const void *buffer, size_t size, int flags,
-                   int handler_flags) { return 0; }
+               int set(const struct xattr_handler *handler,
+                   struct dentry *dentry, const char *name,
+                   const void *buffer, size_t size, int flags)
+                   { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
                        .set = set,
@@ -106,16 +135,23 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_SET], [
        ],[
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_DENTRY_XATTR_SET, 1,
-                   [xattr_handler->set() wants dentry])
+               AC_DEFINE(HAVE_XATTR_SET_HANDLER, 1,
+                   [xattr_handler->set() wants xattr_handler])
        ],[
+               dnl #
+               dnl # 2.6.33 API change,
+               dnl # The xattr_handler->set() callback was changed to take a
+               dnl # dentry instead of an inode, and a handler_flags
+               dnl # argument was added.
+               dnl #
                AC_MSG_RESULT(no)
-               AC_MSG_CHECKING([whether xattr_handler->set() wants xattr_handler])
+               AC_MSG_CHECKING([whether xattr_handler->set() wants dentry])
                ZFS_LINUX_TRY_COMPILE([
                        #include <linux/xattr.h>
 
-                       int set(const struct xattr_handler *handler, struct dentry *dentry,
-                           const char *name, const void *buffer, size_t size, int flags) { return 0; }
+                       int set(struct dentry *dentry, const char *name,
+                           const void *buffer, size_t size, int flags,
+                           int handler_flags) { return 0; }
                        static const struct xattr_handler
                            xops __attribute__ ((unused)) = {
                                .set = set,
@@ -123,32 +159,49 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_SET], [
                ],[
                ],[
                        AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_HANDLER_XATTR_SET, 1,
-                           [xattr_handler->set() wants xattr_handler])
+                       AC_DEFINE(HAVE_XATTR_SET_DENTRY, 1,
+                           [xattr_handler->set() wants dentry])
                ],[
+                       dnl #
+                       dnl # 2.6.32 API
+                       dnl #
                        AC_MSG_RESULT(no)
+                       AC_MSG_CHECKING(
+                           [whether xattr_handler->set() wants inode])
+                       ZFS_LINUX_TRY_COMPILE([
+                               #include <linux/xattr.h>
+
+                               int set(struct inode *ip, const char *name,
+                                   const void *buffer, size_t size, int flags)
+                                   { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .set = set,
+                               };
+                       ],[
+                       ],[
+                               AC_MSG_RESULT(yes)
+                               AC_DEFINE(HAVE_XATTR_SET_INODE, 1,
+                                   [xattr_handler->set() wants inode])
+                       ],[
+                               AC_MSG_ERROR([no; please file a bug report])
+                       ])
                ])
        ])
 ])
 
 dnl #
-dnl # 2.6.33 API change,
-dnl # The xattr_hander->list() callback was changed to take a dentry
-dnl # instead of an inode, and a handler_flags argument was added.
-dnl #
-dnl # 4.4 API change,
-dnl # The xattr_hander->list() callback was changed to take a xattr_handler,
-dnl # and handler_flags argument was removed and should be accessed by
-dnl # handler->flags.
+dnl # Supported xattr handler list() interfaces checked newest to oldest.
 dnl #
 AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_LIST], [
-       AC_MSG_CHECKING([whether xattr_handler->list() wants dentry])
+       dnl # 4.5 API change,
+       dnl # The xattr_handler->list() callback was changed to take only a
+       dnl # dentry and it only needs to return if it's accessable.
+       AC_MSG_CHECKING([whether xattr_handler->list() wants simple])
        ZFS_LINUX_TRY_COMPILE([
                #include <linux/xattr.h>
 
-               size_t list(struct dentry *dentry, char *list, size_t list_size,
-                   const char *name, size_t name_len, int handler_flags)
-                   { return 0; }
+               bool list(struct dentry *dentry) { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
                        .list = list,
@@ -156,16 +209,24 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_LIST], [
        ],[
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_DENTRY_XATTR_LIST, 1,
-                   [xattr_handler->list() wants dentry])
+               AC_DEFINE(HAVE_XATTR_LIST_SIMPLE, 1,
+                   [xattr_handler->list() wants simple])
        ],[
+               dnl #
+               dnl # 4.4 API change,
+               dnl # The xattr_handler->list() callback was changed to take a
+               dnl # xattr_handler, and handler_flags argument was removed
+               dnl # and should be accessed by handler->flags.
+               dnl #
                AC_MSG_RESULT(no)
-               AC_MSG_CHECKING([whether xattr_handler->list() wants xattr_handler])
+               AC_MSG_CHECKING(
+                   [whether xattr_handler->list() wants xattr_handler])
                ZFS_LINUX_TRY_COMPILE([
                        #include <linux/xattr.h>
 
-                       size_t list(const struct xattr_handler *handler, struct dentry *dentry,
-                           char *list, size_t list_size, const char *name, size_t name_len) { return 0; }
+                       size_t list(const struct xattr_handler *handler,
+                           struct dentry *dentry, char *list, size_t list_size,
+                           const char *name, size_t name_len) { return 0; }
                        static const struct xattr_handler
                            xops __attribute__ ((unused)) = {
                                .list = list,
@@ -173,10 +234,61 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_LIST], [
                ],[
                ],[
                        AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_HANDLER_XATTR_LIST, 1,
+                       AC_DEFINE(HAVE_XATTR_LIST_HANDLER, 1,
                            [xattr_handler->list() wants xattr_handler])
                ],[
+                       dnl #
+                       dnl # 2.6.33 API change,
+                       dnl # The xattr_handler->list() callback was changed
+                       dnl # to take a dentry instead of an inode, and a
+                       dnl # handler_flags argument was added.
+                       dnl #
                        AC_MSG_RESULT(no)
+                       AC_MSG_CHECKING(
+                           [whether xattr_handler->list() wants dentry])
+                       ZFS_LINUX_TRY_COMPILE([
+                               #include <linux/xattr.h>
+
+                               size_t list(struct dentry *dentry,
+                                   char *list, size_t list_size,
+                                   const char *name, size_t name_len,
+                                   int handler_flags) { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .list = list,
+                               };
+                       ],[
+                       ],[
+                               AC_MSG_RESULT(yes)
+                               AC_DEFINE(HAVE_XATTR_LIST_DENTRY, 1,
+                                   [xattr_handler->list() wants dentry])
+                       ],[
+                               dnl #
+                               dnl # 2.6.32 API
+                               dnl #
+                               AC_MSG_RESULT(no)
+                               AC_MSG_CHECKING(
+                                   [whether xattr_handler->list() wants inode])
+                               ZFS_LINUX_TRY_COMPILE([
+                                       #include <linux/xattr.h>
+
+                                       size_t list(struct inode *ip, char *lst,
+                                           size_t list_size, const char *name,
+                                           size_t name_len) { return 0; }
+                                       static const struct xattr_handler
+                                           xops __attribute__ ((unused)) = {
+                                               .list = list,
+                                       };
+                               ],[
+                               ],[
+                                       AC_MSG_RESULT(yes)
+                                       AC_DEFINE(HAVE_XATTR_LIST_INODE, 1,
+                                           [xattr_handler->list() wants inode])
+                               ],[
+                                       AC_MSG_ERROR(
+                                           [no; please file a bug report])
+                               ])
+                       ])
                ])
        ])
 ])
index c655a9a1ddd0670a9ba29fa579f3c8638416e037..bac7d4d43a9cfdea7077fa22d91a16b58ed3574a 100644 (file)
@@ -58,7 +58,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
        ZFS_AC_KERNEL_MKDIR_UMODE_T
        ZFS_AC_KERNEL_LOOKUP_NAMEIDATA
        ZFS_AC_KERNEL_CREATE_NAMEIDATA
-       ZFS_AC_KERNEL_FOLLOW_LINK
+       ZFS_AC_KERNEL_GET_LINK
        ZFS_AC_KERNEL_PUT_LINK
        ZFS_AC_KERNEL_TRUNCATE_RANGE
        ZFS_AC_KERNEL_AUTOMOUNT
index 97cf3bb0857b26e284cc8dc8e155a2030d9ade58..28e1c2d05342ad227f351f1fd3f12fa6b99d150d 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for zfs 0.6.5.4.
+# Generated by GNU Autoconf 2.68 for zfs 0.6.5.5.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='zfs'
 PACKAGE_TARNAME='zfs'
-PACKAGE_VERSION='0.6.5.4'
-PACKAGE_STRING='zfs 0.6.5.4'
+PACKAGE_VERSION='0.6.5.5'
+PACKAGE_STRING='zfs 0.6.5.5'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures zfs 0.6.5.4 to adapt to many kinds of systems.
+\`configure' configures zfs 0.6.5.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1472,7 +1472,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of zfs 0.6.5.4:";;
+     short | recursive ) echo "Configuration of zfs 0.6.5.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1607,7 +1607,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-zfs configure 0.6.5.4
+zfs configure 0.6.5.5
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1972,7 +1972,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by zfs $as_me 0.6.5.4, which was
+It was created by zfs $as_me 0.6.5.5, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3099,7 +3099,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='zfs'
- VERSION='0.6.5.4'
+ VERSION='0.6.5.5'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14836,8 +14836,9 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block uses const struct xattr_hander" >&5
-$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; }
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block uses const struct xattr_handler" >&5
+$as_echo_n "checking whether super_block uses const struct xattr_handler... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14915,8 +14916,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
+                                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14924,8 +14925,9 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/xattr.h>
 
-               int get(struct dentry *dentry, const char *name,
-                   void *buffer, size_t size, int handler_flags) { return 0; }
+               int get(const struct xattr_handler *handler,
+                   struct dentry *dentry, const char *name,
+                   void *buffer, size_t size) { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
                        .get = get,
@@ -14968,17 +14970,17 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_DENTRY_XATTR_GET 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_GET_HANDLER 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants xattr_handler" >&5
-$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14986,8 +14988,9 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                        #include <linux/xattr.h>
 
-                       int get(const struct xattr_handler *handler, struct dentry *dentry,
-                           const char *name, void *buffer, size_t size) { return 0; }
+                       int get(struct dentry *dentry, const char *name,
+                           void *buffer, size_t size, int handler_flags)
+                           { return 0; }
                        static const struct xattr_handler
                            xops __attribute__ ((unused)) = {
                                .get = get,
@@ -15030,15 +15033,76 @@ _ACEOF
                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_HANDLER_XATTR_GET 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_GET_DENTRY 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+                               #include <linux/xattr.h>
+
+                               int get(struct inode *ip, const char *name,
+                                   void *buffer, size_t size) { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .get = get,
+                               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_XATTR_GET_INODE 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                               as_fn_error $? "no; please file a bug report" "$LINENO" 5
 
 
 
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
+
+fi
+       rm -Rf build
+
+
+
+
+                                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15064,9 +15135,10 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/xattr.h>
 
-               int set(struct dentry *dentry, const char *name,
-                   const void *buffer, size_t size, int flags,
-                   int handler_flags) { return 0; }
+               int set(const struct xattr_handler *handler,
+                   struct dentry *dentry, const char *name,
+                   const void *buffer, size_t size, int flags)
+                   { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
                        .set = set,
@@ -15109,17 +15181,17 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_DENTRY_XATTR_SET 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_SET_HANDLER 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants xattr_handler" >&5
-$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15127,8 +15199,9 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                        #include <linux/xattr.h>
 
-                       int set(const struct xattr_handler *handler, struct dentry *dentry,
-                           const char *name, const void *buffer, size_t size, int flags) { return 0; }
+                       int set(struct dentry *dentry, const char *name,
+                           const void *buffer, size_t size, int flags,
+                           int handler_flags) { return 0; }
                        static const struct xattr_handler
                            xops __attribute__ ((unused)) = {
                                .set = set,
@@ -15171,15 +15244,77 @@ _ACEOF
                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_HANDLER_XATTR_SET 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_SET_DENTRY 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+                               #include <linux/xattr.h>
+
+                               int set(struct inode *ip, const char *name,
+                                   const void *buffer, size_t size, int flags)
+                                   { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .set = set,
+                               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_XATTR_SET_INODE 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                               as_fn_error $? "no; please file a bug report" "$LINENO" 5
 
 
 
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->list() wants dentry... " >&6; }
+
+fi
+       rm -Rf build
+
+
+
+
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants simple" >&5
+$as_echo_n "checking whether xattr_handler->list() wants simple... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -15205,9 +15347,7 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/xattr.h>
 
-               size_t list(struct dentry *dentry, char *list, size_t list_size,
-                   const char *name, size_t name_len, int handler_flags)
-                   { return 0; }
+               bool list(struct dentry *dentry) { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
                        .list = list,
@@ -15250,14 +15390,14 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_DENTRY_XATTR_LIST 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_LIST_SIMPLE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants xattr_handler" >&5
 $as_echo_n "checking whether xattr_handler->list() wants xattr_handler... " >&6; }
@@ -15268,8 +15408,9 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                        #include <linux/xattr.h>
 
-                       size_t list(const struct xattr_handler *handler, struct dentry *dentry,
-                           char *list, size_t list_size, const char *name, size_t name_len) { return 0; }
+                       size_t list(const struct xattr_handler *handler,
+                           struct dentry *dentry, char *list, size_t list_size,
+                           const char *name, size_t name_len) { return 0; }
                        static const struct xattr_handler
                            xops __attribute__ ((unused)) = {
                                .list = list,
@@ -15312,15 +15453,155 @@ _ACEOF
                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_HANDLER_XATTR_LIST 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_LIST_HANDLER 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                                                                                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->list() wants dentry... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+                               #include <linux/xattr.h>
+
+                               size_t list(struct dentry *dentry,
+                                   char *list, size_t list_size,
+                                   const char *name, size_t name_len,
+                                   int handler_flags) { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .list = list,
+                               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_XATTR_LIST_DENTRY 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->list() wants inode... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+                                       #include <linux/xattr.h>
+
+                                       size_t list(struct inode *ip, char *lst,
+                                           size_t list_size, const char *name,
+                                           size_t name_len) { return 0; }
+                                       static const struct xattr_handler
+                                           xops __attribute__ ((unused)) = {
+                                               .list = list,
+                                       };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_XATTR_LIST_INODE 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                                       as_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
+
+
 
 
 
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->follow_link() passes nameidata" >&5
-$as_echo_n "checking whether iops->follow_link() passes nameidata... " >&6; }
+                                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->get_link() passes delayed" >&5
+$as_echo_n "checking whether iops->get_link() passes delayed... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
-               const char *follow_link(struct dentry *de, void **cookie)
-                   { return "symlink"; }
-               static struct inode_operations iops __attribute__ ((unused)) = {
-                       .follow_link = follow_link,
+               const char *get_link(struct dentry *de, struct inode *ip,
+                   struct delayed_call *done) { return "symlink"; }
+               static struct inode_operations
+                    iops __attribute__ ((unused)) = {
+                       .get_link = get_link,
                };
 
 int
@@ -17407,39 +17689,32 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_FOLLOW_LINK_NAMEIDATA 1" >>confdefs.h
-
-
-
-
-fi
-       rm -Rf build
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
+$as_echo "#define HAVE_GET_LINK_DELAYED 1" >>confdefs.h
 
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->put_link() passes nameidata" >&5
-$as_echo_n "checking whether iops->put_link() passes nameidata... " >&6; }
+                                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->get_link() passes cookie" >&5
+$as_echo_n "checking whether iops->get_link() passes cookie... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
-               void put_link(struct inode *ip, void *cookie) { return; }
-               static struct inode_operations iops __attribute__ ((unused)) = {
-                       .put_link = put_link,
-               };
+                       #include <linux/fs.h>
+                       const char *get_link(struct dentry *de, struct
+                           inode *ip, void **cookie) { return "symlink"; }
+                       static struct inode_operations
+                            iops __attribute__ ((unused)) = {
+                               .get_link = get_link,
+                       };
 
 int
 main (void)
@@ -17475,39 +17750,32 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_PUT_LINK_NAMEIDATA 1" >>confdefs.h
-
-
-
-
-fi
-       rm -Rf build
+$as_echo "#define HAVE_GET_LINK_COOKIE 1" >>confdefs.h
 
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->truncate_range() exists" >&5
-$as_echo_n "checking whether iops->truncate_range() exists... " >&6; }
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->follow_link() passes cookie" >&5
+$as_echo_n "checking whether iops->follow_link() passes cookie... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
-               void truncate_range(struct inode *inode, loff_t start,
-                                   loff_t end) { return; }
-               static struct inode_operations iops __attribute__ ((unused)) = {
-                       .truncate_range = truncate_range,
+               const char *follow_link(struct dentry *de,
+                   void **cookie) { return "symlink"; }
+               static struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .follow_link = follow_link,
                };
 
 int
@@ -17547,36 +17815,29 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_INODE_TRUNCATE_RANGE 1" >>confdefs.h
+$as_echo "#define HAVE_FOLLOW_LINK_COOKIE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_automount() exists" >&5
-$as_echo_n "checking whether dops->d_automount() exists... " >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->follow_link() passes nameidata" >&5
+$as_echo_n "checking whether iops->follow_link() passes nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/dcache.h>
-               struct vfsmount *d_automount(struct path *p) { return NULL; }
-               struct dentry_operations dops __attribute__ ((unused)) = {
-                       .d_automount = d_automount,
-               };
+               #include <linux/fs.h>
+                       void *follow_link(struct dentry *de, struct
+                           nameidata *nd) { return (void *)NULL; }
+                       static struct inode_operations
+                           iops __attribute__ ((unused)) = {
+                               .follow_link = follow_link,
+                       };
 
 int
 main (void)
@@ -17612,18 +17873,39 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_AUTOMOUNT 1" >>confdefs.h
+$as_echo "#define HAVE_FOLLOW_LINK_NAMEIDATA 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+                        as_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+
+fi
+       rm -Rf build
+
+
 
 
 
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether eops->encode_fh() wants inode" >&5
-$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #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,
-               };
+               #if !defined(HAVE_GET_LINK_DELAYED)
+               #error "Expecting get_link() delayed done"
+               #endif
 
 int
 main (void)
@@ -17681,39 +17958,28 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_ENCODE_FH_WITH_INODE 1" >>confdefs.h
+$as_echo "#define HAVE_PUT_LINK_DELAYED 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether eops->commit_metadata() exists" >&5
-$as_echo_n "checking whether eops->commit_metadata() exists... " >&6; }
+                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->put_link() passes cookie" >&5
+$as_echo_n "checking whether iops->put_link() passes cookie... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/exportfs.h>
-               int commit_metadata(struct inode *inode) { return 0; }
-               static struct export_operations eops __attribute__ ((unused))={
-                       .commit_metadata = commit_metadata,
-               };
+                       #include <linux/fs.h>
+                       void put_link(struct inode *ip, void *cookie)
+                           { return; }
+                       static struct inode_operations
+                           iops __attribute__ ((unused)) = {
+                               .put_link = put_link,
+                       };
 
 int
 main (void)
@@ -17749,41 +18015,37 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_COMMIT_METADATA 1" >>confdefs.h
+$as_echo "#define HAVE_PUT_LINK_COOKIE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether clear_inode() is available" >&5
-$as_echo_n "checking whether clear_inode() is available... " >&6; }
-
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->put_link() passes nameidata" >&5
+$as_echo_n "checking whether iops->put_link() passes nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
+                               #include <linux/fs.h>
+                               void put_link(struct dentry *de, struct
+                                   nameidata *nd, void *ptr) { return; }
+                               static struct inode_operations
+                                   iops __attribute__ ((unused)) = {
+                                       .put_link = put_link,
+                               };
 
 int
 main (void)
 {
 
-               clear_inode(NULL);
 
   ;
   return 0;
@@ -17813,81 +18075,59 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
+
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_PUT_LINK_NAMEIDATA 1" >>confdefs.h
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
+
+                               as_fn_error $? "no; please file a bug report" "$LINENO" 5
+
 
 
 fi
        rm -Rf build
 
 
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]clear_inode[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+fi
+       rm -Rf build
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CLEAR_INODE 1" >>confdefs.h
 
+fi
+       rm -Rf build
 
-               fi
-       fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether insert_inode_locked() is available" >&5
-$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->truncate_range() exists" >&5
+$as_echo_n "checking whether iops->truncate_range() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
+               void truncate_range(struct inode *inode, loff_t start,
+                                   loff_t end) { return; }
+               static struct inode_operations iops __attribute__ ((unused)) = {
+                       .truncate_range = truncate_range,
+               };
 
 int
 main (void)
 {
 
-               insert_inode_locked(NULL);
 
   ;
   return 0;
@@ -17917,81 +18157,114 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_INODE_TRUNCATE_RANGE 1" >>confdefs.h
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 
 
 fi
        rm -Rf build
 
 
-       if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_automount() exists" >&5
+$as_echo_n "checking whether dops->d_automount() exists... " >&6; }
 
-       grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/inode.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+cat confdefs.h - <<_ACEOF >conftest.c
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-               else :
+               #include <linux/dcache.h>
+               struct vfsmount *d_automount(struct path *p) { return NULL; }
+               struct dentry_operations dops __attribute__ ((unused)) = {
+                       .d_automount = d_automount,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_INSERT_INODE_LOCKED 1" >>confdefs.h
+$as_echo "#define HAVE_AUTOMOUNT 1" >>confdefs.h
 
 
-               fi
-       fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_make_root() is available" >&5
-$as_echo_n "checking whether d_make_root() is available... " >&6; }
 
 
+fi
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether eops->encode_fh() wants inode" >&5
+$as_echo_n "checking whether eops->encode_fh() wants inode... " >&6; }
+
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/dcache.h>
+               #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,
+               };
 
 int
 main (void)
 {
 
-               d_make_root(NULL);
 
   ;
   return 0;
@@ -18021,81 +18294,110 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_ENCODE_FH_WITH_INODE 1" >>confdefs.h
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 
 
 fi
        rm -Rf build
 
 
-       if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether eops->commit_metadata() exists" >&5
+$as_echo_n "checking whether eops->commit_metadata() exists... " >&6; }
 
-       grep -q -E '[[:space:]]d_make_root[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+cat confdefs.h - <<_ACEOF >conftest.c
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-               else :
+               #include <linux/exportfs.h>
+               int commit_metadata(struct inode *inode) { return 0; }
+               static struct export_operations eops __attribute__ ((unused))={
+                       .commit_metadata = commit_metadata,
+               };
+
+int
+main (void)
+{
+
+
+  ;
+  return 0;
+}
+
+_ACEOF
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_D_MAKE_ROOT 1" >>confdefs.h
+$as_echo "#define HAVE_COMMIT_METADATA 1" >>confdefs.h
 
 
-               fi
-       fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_obtain_alias() is available" >&5
-$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
+
+fi
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether clear_inode() is available" >&5
+$as_echo_n "checking whether clear_inode() is available... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/dcache.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               d_obtain_alias(NULL);
+               clear_inode(NULL);
 
   ;
   return 0;
@@ -18144,13 +18446,13 @@ $as_echo "no" >&6; }
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
+       grep -q -E '[[:space:]]clear_inode[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(clear_inode)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -18178,29 +18480,28 @@ $as_echo "no" >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_D_OBTAIN_ALIAS 1" >>confdefs.h
+$as_echo "#define HAVE_CLEAR_INODE 1" >>confdefs.h
 
 
                fi
        fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_prune_aliases() is available" >&5
-$as_echo_n "checking whether d_prune_aliases() is available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether insert_inode_locked() is available" >&5
+$as_echo_n "checking whether insert_inode_locked() is available... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/dcache.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct inode *ip = NULL;
-               d_prune_aliases(ip);
+               insert_inode_locked(NULL);
 
   ;
   return 0;
@@ -18249,13 +18550,13 @@ $as_echo "no" >&6; }
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]d_prune_aliases[[:space:]]' \
+       grep -q -E '[[:space:]]insert_inode_locked[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_prune_aliases)" \
+               for file in fs/inode.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(insert_inode_locked)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -18283,15 +18584,15 @@ $as_echo "no" >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_D_PRUNE_ALIASES 1" >>confdefs.h
+$as_echo "#define HAVE_INSERT_INODE_LOCKED 1" >>confdefs.h
 
 
                fi
        fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_set_d_op() is available" >&5
-$as_echo_n "checking whether d_set_d_op() is available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_make_root() is available" >&5
+$as_echo_n "checking whether d_make_root() is available... " >&6; }
 
 
 
@@ -18304,7 +18605,7 @@ int
 main (void)
 {
 
-               d_set_d_op(NULL, NULL);
+               d_make_root(NULL);
 
   ;
   return 0;
@@ -18353,13 +18654,13 @@ $as_echo "no" >&6; }
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]d_set_d_op[[:space:]]' \
+       grep -q -E '[[:space:]]d_make_root[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
                for file in fs/dcache.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(d_set_d_op)" \
+                       grep -q -E "EXPORT_SYMBOL.*(d_make_root)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -18387,16 +18688,16 @@ $as_echo "no" >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_D_SET_D_OP 1" >>confdefs.h
+$as_echo "#define HAVE_D_MAKE_ROOT 1" >>confdefs.h
 
 
                fi
        fi
 
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_obtain_alias() is available" >&5
+$as_echo_n "checking whether d_obtain_alias() is available... " >&6; }
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_revalidate() takes struct nameidata" >&5
-$as_echo_n "checking whether dops->d_revalidate() takes struct nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -18404,18 +18705,11 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/dcache.h>
 
-               int revalidate (struct dentry *dentry,
-                   struct nameidata *nidata) { return 0; }
-
-               static const struct dentry_operations
-                   dops __attribute__ ((unused)) = {
-                       .d_revalidate   = revalidate,
-               };
-
 int
 main (void)
 {
 
+               d_obtain_alias(NULL);
 
   ;
   return 0;
@@ -18445,113 +18739,82 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_D_REVALIDATE_NAMEIDATA 1" >>confdefs.h
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
        rm -Rf build
 
 
+       if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dentry uses const struct dentry_operations" >&5
-$as_echo_n "checking whether dentry uses const struct dentry_operations... " >&6; }
-
+       else
+               if test "x$enable_linux_builtin" != xyes; then
 
-cat confdefs.h - <<_ACEOF >conftest.c
-
-
-               #include <linux/dcache.h>
-
-               const struct dentry_operations test_d_op = {
-                       .d_revalidate = NULL,
-               };
-
-int
-main (void)
-{
-
-               struct dentry d __attribute__ ((unused));
-
-               d.d_op = &test_d_op;
-
-  ;
-  return 0;
-}
-
-_ACEOF
-
-
-
-cat - <<_ACEOF >conftest.h
+       grep -q -E '[[:space:]]d_obtain_alias[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_obtain_alias)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-_ACEOF
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
-       echo "obj-m := conftest.o" >build/Makefile
-       modpost_flag=''
-       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
-       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
-  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
-  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
+               else :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CONST_DENTRY_OPERATIONS 1" >>confdefs.h
-
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
+$as_echo "#define HAVE_D_OBTAIN_ALIAS 1" >>confdefs.h
 
-fi
-       rm -Rf build
 
+               fi
+       fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether check_disk_size_change() is available" >&5
-$as_echo_n "checking whether check_disk_size_change() is available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_prune_aliases() is available" >&5
+$as_echo_n "checking whether d_prune_aliases() is available... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
+               #include <linux/dcache.h>
 
 int
 main (void)
 {
 
-               check_disk_size_change(NULL, NULL);
+               struct inode *ip = NULL;
+               d_prune_aliases(ip);
 
   ;
   return 0;
@@ -18600,13 +18863,13 @@ $as_echo "no" >&6; }
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
+       grep -q -E '[[:space:]]d_prune_aliases[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_prune_aliases)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -18634,28 +18897,28 @@ $as_echo "no" >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CHECK_DISK_SIZE_CHANGE 1" >>confdefs.h
+$as_echo "#define HAVE_D_PRUNE_ALIASES 1" >>confdefs.h
 
 
                fi
        fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether truncate_setsize() is available" >&5
-$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether d_set_d_op() is available" >&5
+$as_echo_n "checking whether d_set_d_op() is available... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/mm.h>
+               #include <linux/dcache.h>
 
 int
 main (void)
 {
 
-               truncate_setsize(NULL, 0);
+               d_set_d_op(NULL, NULL);
 
   ;
   return 0;
@@ -18704,13 +18967,13 @@ $as_echo "no" >&6; }
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
+       grep -q -E '[[:space:]]d_set_d_op[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in mm/truncate.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
+               for file in fs/dcache.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(d_set_d_op)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -18738,7 +19001,7 @@ $as_echo "no" >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_TRUNCATE_SETSIZE 1" >>confdefs.h
+$as_echo "#define HAVE_D_SET_D_OP 1" >>confdefs.h
 
 
                fi
@@ -18746,27 +19009,27 @@ $as_echo "#define HAVE_TRUNCATE_SETSIZE 1" >>confdefs.h
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants 6 args" >&5
-$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dops->d_revalidate() takes struct nameidata" >&5
+$as_echo_n "checking whether dops->d_revalidate() takes struct nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/security.h>
+               #include <linux/dcache.h>
+
+               int revalidate (struct dentry *dentry,
+                   struct nameidata *nidata) { return 0; }
+
+               static const struct dentry_operations
+                   dops __attribute__ ((unused)) = {
+                       .d_revalidate   = revalidate,
+               };
 
 int
 main (void)
 {
 
-               struct inode *ip __attribute__ ((unused)) = NULL;
-               struct inode *dip __attribute__ ((unused)) = NULL;
-               const struct qstr *str __attribute__ ((unused)) = NULL;
-               char *name __attribute__ ((unused)) = NULL;
-               void *value __attribute__ ((unused)) = NULL;
-               size_t len __attribute__ ((unused)) = 0;
-
-               security_inode_init_security(ip, dip, str, &name, &value, &len);
 
   ;
   return 0;
@@ -18800,7 +19063,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1" >>confdefs.h
+$as_echo "#define HAVE_D_REVALIDATE_NAMEIDATA 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants callback" >&5
-$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dentry uses const struct dentry_operations" >&5
+$as_echo_n "checking whether dentry uses const struct dentry_operations... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/security.h>
+               #include <linux/dcache.h>
+
+               const struct dentry_operations test_d_op = {
+                       .d_revalidate = NULL,
+               };
 
 int
 main (void)
 {
 
-               struct inode *ip __attribute__ ((unused)) = NULL;
-               struct inode *dip __attribute__ ((unused)) = NULL;
-               const struct qstr *str __attribute__ ((unused)) = NULL;
-               initxattrs func __attribute__ ((unused)) = NULL;
+               struct dentry d __attribute__ ((unused));
 
-               security_inode_init_security(ip, dip, str, func, NULL);
+               d.d_op = &test_d_op;
 
   ;
   return 0;
@@ -18870,7 +19134,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1" >>confdefs.h
+$as_echo "#define HAVE_CONST_DENTRY_OPERATIONS 1" >>confdefs.h
 
 
 else
@@ -18887,8 +19151,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mount_nodev() is available" >&5
-$as_echo_n "checking whether mount_nodev() is available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether check_disk_size_change() is available" >&5
+$as_echo_n "checking whether check_disk_size_change() is available... " >&6; }
 
 
 
@@ -18901,7 +19165,7 @@ int
 main (void)
 {
 
-               mount_nodev(NULL, 0, NULL, NULL);
+               check_disk_size_change(NULL, NULL);
 
   ;
   return 0;
@@ -18950,13 +19214,13 @@ $as_echo "no" >&6; }
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
+       grep -q -E '[[:space:]]check_disk_size_change[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in fs/super.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(check_disk_size_change)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -18984,37 +19248,28 @@ $as_echo "no" >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_MOUNT_NODEV 1" >>confdefs.h
+$as_echo "#define HAVE_CHECK_DISK_SIZE_CHANGE 1" >>confdefs.h
 
 
                fi
        fi
 
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether truncate_setsize() is available" >&5
+$as_echo_n "checking whether truncate_setsize() is available... " >&6; }
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink" >&5
-$as_echo_n "checking whether super_block has s_shrink... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
-
-               int shrink(struct shrinker *s, struct shrink_control *sc)
-                   { return 0; }
-
-               static const struct super_block
-                   sb __attribute__ ((unused)) = {
-                       .s_shrink.shrink = shrink,
-                       .s_shrink.seeks = DEFAULT_SEEKS,
-                       .s_shrink.batch = 0,
-               };
+               #include <linux/mm.h>
 
 int
 main (void)
 {
 
+               truncate_setsize(NULL, 0);
 
   ;
   return 0;
@@ -19044,47 +19299,90 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_SHRINK 1" >>confdefs.h
+fi
+       rm -Rf build
 
 
+       if test $rc -ne 0; then :
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]truncate_setsize[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/truncate.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(truncate_setsize)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-       rm -Rf build
+$as_echo "#define HAVE_TRUNCATE_SETSIZE 1" >>confdefs.h
 
 
+               fi
+       fi
+
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shrink_control has nid" >&5
-$as_echo_n "checking whether shrink_control has nid... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants 6 args" >&5
+$as_echo_n "checking whether security_inode_init_security wants 6 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
+               #include <linux/security.h>
 
 int
 main (void)
 {
 
-               struct shrink_control sc __attribute__ ((unused));
-               unsigned long scnidsize __attribute__ ((unused)) =
-                   sizeof(sc.nid);
-
-  ;
+               struct inode *ip __attribute__ ((unused)) = NULL;
+               struct inode *dip __attribute__ ((unused)) = NULL;
+               const struct qstr *str __attribute__ ((unused)) = NULL;
+               char *name __attribute__ ((unused)) = NULL;
+               void *value __attribute__ ((unused)) = NULL;
+               size_t len __attribute__ ((unused)) = 0;
+
+               security_inode_init_security(ip, dip, str, &name, &value, &len);
+
+  ;
   return 0;
 }
 
@@ -19116,7 +19414,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define SHRINK_CONTROL_HAS_NID 1" >>confdefs.h
+$as_echo "#define HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_instances list_head" >&5
-$as_echo_n "checking whether super_block has s_instances list_head... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether security_inode_init_security wants callback" >&5
+$as_echo_n "checking whether security_inode_init_security wants callback... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
+               #include <linux/security.h>
 
 int
 main (void)
 {
 
-               struct super_block sb __attribute__ ((unused));
+               struct inode *ip __attribute__ ((unused)) = NULL;
+               struct inode *dip __attribute__ ((unused)) = NULL;
+               const struct qstr *str __attribute__ ((unused)) = NULL;
+               initxattrs func __attribute__ ((unused)) = NULL;
 
-               INIT_LIST_HEAD(&sb.s_instances);
+               security_inode_init_security(ip, dip, str, func, NULL);
 
   ;
   return 0;
@@ -19183,7 +19484,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_S_INSTANCES_LIST_HEAD 1" >>confdefs.h
+$as_echo "#define HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY 1" >>confdefs.h
 
 
 else
@@ -19200,8 +19501,9 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_d_op" >&5
-$as_echo_n "checking whether super_block has s_d_op... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mount_nodev() is available" >&5
+$as_echo_n "checking whether mount_nodev() is available... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19213,8 +19515,7 @@ int
 main (void)
 {
 
-               struct super_block sb __attribute__ ((unused));
-               sb.s_d_op = NULL;
+               mount_nodev(NULL, 0, NULL, NULL);
 
   ;
   return 0;
@@ -19244,46 +19545,90 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_S_D_OP 1" >>confdefs.h
+fi
+       rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]mount_nodev[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/super.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(mount_nodev)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-       rm -Rf build
+$as_echo "#define HAVE_MOUNT_NODEV 1" >>confdefs.h
 
 
+               fi
+       fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 2 args" >&5
-$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_shrink" >&5
+$as_echo_n "checking whether super_block has s_shrink... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/backing-dev.h>
-               struct backing_dev_info bdi;
+               #include <linux/fs.h>
+
+               int shrink(struct shrinker *s, struct shrink_control *sc)
+                   { return 0; }
+
+               static const struct super_block
+                   sb __attribute__ ((unused)) = {
+                       .s_shrink.shrink = shrink,
+                       .s_shrink.seeks = DEFAULT_SEEKS,
+                       .s_shrink.batch = 0,
+               };
 
 int
 main (void)
 {
 
-               char *name = "bdi";
-               int error __attribute__((unused)) =
-                   bdi_setup_and_register(&bdi, name);
 
   ;
   return 0;
@@ -19313,40 +19658,45 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_SHRINK 1" >>confdefs.h
+
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 
 
 fi
        rm -Rf build
 
 
-       if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
-$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether shrink_control has nid" >&5
+$as_echo_n "checking whether shrink_control has nid... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-                       #include <linux/backing-dev.h>
-                       struct backing_dev_info bdi;
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-                       char *name = "bdi";
-                       unsigned int cap = BDI_CAP_MAP_COPY;
-                       int error __attribute__((unused)) =
-                           bdi_setup_and_register(&bdi, name, cap);
+               struct shrink_control sc __attribute__ ((unused));
+               unsigned long scnidsize __attribute__ ((unused)) =
+                   sizeof(sc.nid);
 
   ;
   return 0;
@@ -19376,116 +19726,44 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-       rm -Rf build
-
-
-       if test $rc -ne 0; then :
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+$as_echo "#define SHRINK_CONTROL_HAS_NID 1" >>confdefs.h
 
-       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in mm/backing-dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
-
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
-
-
-               fi
-       fi
 
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+fi
+       rm -Rf build
 
-       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in mm/backing-dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
-$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_instances list_head" >&5
+$as_echo_n "checking whether super_block has s_instances list_head... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-                       #include <linux/backing-dev.h>
-                       struct backing_dev_info bdi;
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-                       char *name = "bdi";
-                       unsigned int cap = BDI_CAP_MAP_COPY;
-                       int error __attribute__((unused)) =
-                           bdi_setup_and_register(&bdi, name, cap);
+               struct super_block sb __attribute__ ((unused));
+
+               INIT_LIST_HEAD(&sb.s_instances);
 
   ;
   return 0;
@@ -19515,81 +19793,29 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_S_INSTANCES_LIST_HEAD 1" >>confdefs.h
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
 
 
 fi
        rm -Rf build
 
 
-       if test $rc -ne 0; then :
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-       else
-               if test "x$enable_linux_builtin" != xyes; then
-
-       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in mm/backing-dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
-
-               fi
-               if test $rc -ne 0; then :
-
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-               else :
-
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
-
-
-               fi
-       fi
-
-
-               else :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
-
-
-               fi
-       fi
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether set_nlink() is available" >&5
-$as_echo_n "checking whether set_nlink() is available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block has s_d_op" >&5
+$as_echo_n "checking whether super_block has s_d_op... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -19601,9 +19827,8 @@ int
 main (void)
 {
 
-               struct inode node;
-               unsigned int link = 0;
-               (void) set_nlink(&node, link);
+               struct super_block sb __attribute__ ((unused));
+               sb.s_d_op = NULL;
 
   ;
   return 0;
@@ -19637,7 +19862,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_SET_NLINK 1" >>confdefs.h
+$as_echo "#define HAVE_S_D_OP 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether elevator_change() is available" >&5
-$as_echo_n "checking whether elevator_change() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 2 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 2 args... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/blkdev.h>
-               #include <linux/elevator.h>
+               #include <linux/backing-dev.h>
+               struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-               int ret;
-               struct request_queue *q = NULL;
-               char *elevator = NULL;
-               ret = elevator_change(q, elevator);
+               char *name = "bdi";
+               int error __attribute__((unused)) =
+                   bdi_setup_and_register(&bdi, name);
 
   ;
   return 0;
@@ -19704,47 +19927,40 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_ELEVATOR_CHANGE 1" >>confdefs.h
-
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
+ rc=1
 
 
 fi
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sget() wants 5 args" >&5
-$as_echo_n "checking whether sget() wants 5 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
+                       #include <linux/backing-dev.h>
+                       struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-               struct file_system_type *type = NULL;
-               int (*test)(struct super_block *,void *) = NULL;
-               int (*set)(struct super_block *,void *) = NULL;
-               int flags = 0;
-               void *data = NULL;
-               (void) sget(type, test, set, flags, data);
+                       char *name = "bdi";
+                       unsigned int cap = BDI_CAP_MAP_COPY;
+                       int error __attribute__((unused)) =
+                           bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
@@ -19774,47 +19990,116 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_5ARG_SGET 1" >>confdefs.h
+fi
+       rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-       rm -Rf build
+$as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
 
 
+               fi
+       fi
+
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek_execute() is available" >&5
-$as_echo_n "checking whether lseek_execute() is available... " >&6; }
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdi_setup_and_register() wants 3 args" >&5
+$as_echo_n "checking whether bdi_setup_and_register() wants 3 args... " >&6; }
 
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
+                       #include <linux/backing-dev.h>
+                       struct backing_dev_info bdi;
 
 int
 main (void)
 {
 
-               struct file *fp __attribute__ ((unused)) = NULL;
-               struct inode *ip __attribute__ ((unused)) = NULL;
-               loff_t offset __attribute__ ((unused)) = 0;
-               loff_t maxsize __attribute__ ((unused)) = 0;
-
-               lseek_execute(fp, ip, offset, maxsize);
+                       char *name = "bdi";
+                       unsigned int cap = BDI_CAP_MAP_COPY;
+                       int error __attribute__((unused)) =
+                           bdi_setup_and_register(&bdi, name, cap);
 
   ;
   return 0;
 
        if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
        else
                if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]lseek_exclusive[[:space:]]' \
+       grep -q -E '[[:space:]]bdi_setup_and_register[[:space:]]' \
                $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
        rc=$?
        if test $rc -ne 0; then
                export=0
-               for file in fs/read_write.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(lseek_exclusive)" \
+               for file in mm/backing-dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(bdi_setup_and_register)" \
                                "$LINUX/$file" 2>/dev/null
                        rc=$?
                        if test $rc -eq 0; then
@@ -19889,42 +20174,50 @@ $as_echo "no" >&6; }
                fi
                if test $rc -ne 0; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
                else :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_LSEEK_EXECUTE 1" >>confdefs.h
+$as_echo "#define HAVE_3ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
 
 
                fi
        fi
 
 
+               else :
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->iterate() is available" >&5
-$as_echo_n "checking whether fops->iterate() is available... " >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
+$as_echo "#define HAVE_2ARGS_BDI_SETUP_AND_REGISTER 1" >>confdefs.h
 
-cat confdefs.h - <<_ACEOF >conftest.c
 
+               fi
+       fi
 
-               #include <linux/fs.h>
-               int iterate(struct file *filp, struct dir_context * context)
-                   { return 0; }
 
-               static const struct file_operations fops
-                   __attribute__ ((unused)) = {
-                       .iterate         = iterate,
-               };
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether set_nlink() is available" >&5
+$as_echo_n "checking whether set_nlink() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
+               struct inode node;
+               unsigned int link = 0;
+               (void) set_nlink(&node, link);
 
   ;
   return 0;
@@ -19958,7 +20251,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_VFS_ITERATE 1" >>confdefs.h
+$as_echo "#define HAVE_SET_NLINK 1" >>confdefs.h
 
 
 else
@@ -19968,26 +20261,34 @@ sed 's/^/| /' conftest.$ac_ext >&5
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->readdir() is available" >&5
-$as_echo_n "checking whether fops->readdir() is available... " >&6; }
 
 
-cat confdefs.h - <<_ACEOF >conftest.c
+fi
+       rm -Rf build
 
 
-                       #include <linux/fs.h>
-                       int readdir(struct file *filp, void *entry, filldir_t func)
-                           { return 0; }
 
-                       static const struct file_operations fops
-                           __attribute__ ((unused)) = {
-                               .readdir = readdir,
-                       };
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether elevator_change() is available" >&5
+$as_echo_n "checking whether elevator_change() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/blkdev.h>
+               #include <linux/elevator.h>
 
 int
 main (void)
 {
 
+               int ret;
+               struct request_queue *q = NULL;
+               char *elevator = NULL;
+               ret = elevator_change(q, elevator);
 
   ;
   return 0;
@@ -20018,25 +20319,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_VFS_READDIR 1" >>confdefs.h
+$as_echo "#define HAVE_ELEVATOR_CHANGE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       as_fn_error $? "no; file a bug report with ZFSOnLinux" "$LINENO" 5
-
-
-
-fi
-       rm -Rf build
-
-
-
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->read/write_iter() are available" >&5
-$as_echo_n "checking whether fops->read/write_iter() are available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sget() wants 5 args" >&5
+$as_echo_n "checking whether sget() wants 5 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20054,21 +20349,16 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
-                   { return 0; }
-               ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
-                   { return 0; }
-
-               static const struct file_operations
-                   fops __attribute__ ((unused)) = {
-                   .read_iter = test_read,
-                   .write_iter = test_write,
-               };
-
 int
 main (void)
 {
 
+               struct file_system_type *type = NULL;
+               int (*test)(struct super_block *,void *) = NULL;
+               int (*set)(struct super_block *,void *) = NULL;
+               int flags = 0;
+               void *data = NULL;
+               (void) sget(type, test, set, flags, data);
 
   ;
   return 0;
@@ -20102,7 +20392,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_VFS_RW_ITERATE 1" >>confdefs.h
+$as_echo "#define HAVE_5ARG_SGET 1" >>confdefs.h
 
 
 else
 
 
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek_execute() is available" >&5
+$as_echo_n "checking whether lseek_execute() is available... " >&6; }
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kmap_atomic wants 1 args" >&5
-$as_echo_n "checking whether kmap_atomic wants 1 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/pagemap.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               struct page page;
-               kmap_atomic(&page);
+               struct file *fp __attribute__ ((unused)) = NULL;
+               struct inode *ip __attribute__ ((unused)) = NULL;
+               loff_t offset __attribute__ ((unused)) = 0;
+               loff_t maxsize __attribute__ ((unused)) = 0;
+
+               lseek_execute(fp, ip, offset, maxsize);
 
   ;
   return 0;
@@ -20164,43 +20458,87 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_1ARG_KMAP_ATOMIC 1" >>confdefs.h
+fi
+       rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]lseek_exclusive[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/read_write.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(lseek_exclusive)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-       rm -Rf build
+$as_echo "#define HAVE_LSEEK_EXECUTE 1" >>confdefs.h
 
 
+               fi
+       fi
+
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether follow_down_one() is available" >&5
-$as_echo_n "checking whether follow_down_one() is available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->iterate() is available" >&5
+$as_echo_n "checking whether fops->iterate() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/namei.h>
+               #include <linux/fs.h>
+               int iterate(struct file *filp, struct dir_context * context)
+                   { return 0; }
+
+               static const struct file_operations fops
+                   __attribute__ ((unused)) = {
+                       .iterate         = iterate,
+               };
 
 int
 main (void)
 {
 
-               struct path *p = NULL;
-               follow_down_one(p);
 
   ;
   return 0;
@@ -20234,7 +20572,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_FOLLOW_DOWN_ONE 1" >>confdefs.h
+$as_echo "#define HAVE_VFS_ITERATE 1" >>confdefs.h
 
 
 else
@@ -20244,33 +20582,26 @@ sed 's/^/| /' conftest.$ac_ext >&5
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-
-
-fi
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns int" >&5
-$as_echo_n "checking whether make_request_fn() returns int... " >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->readdir() is available" >&5
+$as_echo_n "checking whether fops->readdir() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/blkdev.h>
+                       #include <linux/fs.h>
+                       int readdir(struct file *filp, void *entry, filldir_t func)
+                           { return 0; }
 
-               int make_request(struct request_queue *q, struct bio *bio)
-               {
-                       return (0);
-               }
+                       static const struct file_operations fops
+                           __attribute__ ((unused)) = {
+                               .readdir = readdir,
+                       };
 
 int
 main (void)
 {
 
-               blk_queue_make_request(NULL, &make_request);
 
   ;
   return 0;
@@ -20301,40 +20632,57 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define MAKE_REQUEST_FN_RET int" >>confdefs.h
-
-
-$as_echo "#define HAVE_MAKE_REQUEST_FN_RET_INT 1" >>confdefs.h
+$as_echo "#define HAVE_VFS_READDIR 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns void" >&5
-$as_echo_n "checking whether make_request_fn() returns void... " >&6; }
+                       as_fn_error $? "no; file a bug report with ZFSOnLinux" "$LINENO" 5
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+
+fi
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->read/write_iter() are available" >&5
+$as_echo_n "checking whether fops->read/write_iter() are available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-                       #include <linux/blkdev.h>
+               #include <linux/fs.h>
 
-                       void make_request(struct request_queue *q, struct bio *bio)
-                       {
-                               return;
-                       }
+               ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
+                   { return 0; }
+               ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
+                   { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                   .read_iter = test_read,
+                   .write_iter = test_write,
+               };
 
 int
 main (void)
 {
 
-                       blk_queue_make_request(NULL, &make_request);
 
   ;
   return 0;
@@ -20365,37 +20713,42 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define MAKE_REQUEST_FN_RET void" >>confdefs.h
+$as_echo "#define HAVE_VFS_RW_ITERATE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns blk_qc_t" >&5
-$as_echo_n "checking whether make_request_fn() returns blk_qc_t... " >&6; }
 
 
-cat confdefs.h - <<_ACEOF >conftest.c
 
+fi
+       rm -Rf build
 
-                               #include <linux/blkdev.h>
 
-                               blk_qc_t make_request(struct request_queue *q, struct bio *bio)
-                               {
-                                       return (BLK_QC_T_NONE);
-                               }
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kmap_atomic wants 1 args" >&5
+$as_echo_n "checking whether kmap_atomic wants 1 args... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/pagemap.h>
 
 int
 main (void)
 {
 
-                               blk_queue_make_request(NULL, &make_request);
+               struct page page;
+               kmap_atomic(&page);
 
   ;
   return 0;
@@ -20426,35 +20779,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h
-
-
-$as_echo "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h
+$as_echo "#define HAVE_1ARG_KMAP_ATOMIC 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                               as_fn_error $? "no - Please file a bug report at
-                                   https://github.com/zfsonlinux/zfs/issues/new" "$LINENO" 5
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-
-fi
-       rm -Rf build
-
-
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic IO accounting symbols are avaliable" >&5
-$as_echo_n "checking whether generic IO accounting symbols are avaliable... " >&6; }
-
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether follow_down_one() is available" >&5
+$as_echo_n "checking whether follow_down_one() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/bio.h>
-
-               void (*generic_start_io_acct_f)(int, unsigned long,
-                   struct hd_struct *) = &generic_start_io_acct;
-               void (*generic_end_io_acct_f)(int, struct hd_struct *,
-                   unsigned long) = &generic_end_io_acct;
+               #include <linux/namei.h>
 
 int
 main (void)
 {
 
-               generic_start_io_acct(0, 0, NULL);
-               generic_end_io_acct(0, NULL, 0);
+               struct path *p = NULL;
+               follow_down_one(p);
 
   ;
   return 0;
@@ -20514,652 +20844,1560 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-fi
-       rm -Rf build
+$as_echo "#define HAVE_FOLLOW_DOWN_ONE 1" >>confdefs.h
 
 
-       if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-       else
-               if test "x$enable_linux_builtin" != xyes; then
 
-       grep -q -E '[[:space:]]generic_start_io_acct[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in block/bio.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(generic_start_io_acct)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+fi
+       rm -Rf build
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-               else :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_GENERIC_IO_ACCT 1" >>confdefs.h
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns int" >&5
+$as_echo_n "checking whether make_request_fn() returns int... " >&6; }
 
 
-               fi
-       fi
+cat confdefs.h - <<_ACEOF >conftest.c
 
 
+               #include <linux/blkdev.h>
 
-       if test "$LINUX_OBJ" != "$LINUX"; then :
+               int make_request(struct request_queue *q, struct bio *bio)
+               {
+                       return (0);
+               }
 
-               KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
+int
+main (void)
+{
 
-fi
+               blk_queue_make_request(NULL, &make_request);
 
+  ;
+  return 0;
+}
 
+_ACEOF
 
-                       KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_BOOL_COMPARE"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
-       KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
 
 
- ;;
-               user)
+cat - <<_ACEOF >conftest.h
 
+_ACEOF
 
-# Check whether --with-mounthelperdir was given.
-if test "${with_mounthelperdir+set}" = set; then :
-  withval=$with_mounthelperdir; mounthelperdir=$withval
-else
-  mounthelperdir=/sbin
-fi
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
+$as_echo "#define MAKE_REQUEST_FN_RET int" >>confdefs.h
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for udev directories" >&5
-$as_echo_n "checking for udev directories... " >&6; }
+$as_echo "#define HAVE_MAKE_REQUEST_FN_RET_INT 1" >>confdefs.h
+
 
-# Check whether --with-udevdir was given.
-if test "${with_udevdir+set}" = set; then :
-  withval=$with_udevdir; udevdir=$withval
 else
-  udevdir=check
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns void" >&5
+$as_echo_n "checking whether make_request_fn() returns void... " >&6; }
 
-       if test "x$udevdir" = xcheck; then :
 
-               path1=/lib/udev
-               path2=/usr/lib/udev
-               default=$path2
+cat confdefs.h - <<_ACEOF >conftest.c
 
-               if test -d "$path1"; then :
-  udevdir="$path1"
-else
 
-                       if test -d "$path2"; then :
-  udevdir="$path2"
-else
-  udevdir="$default"
-fi
+                       #include <linux/blkdev.h>
 
-fi
+                       void make_request(struct request_queue *q, struct bio *bio)
+                       {
+                               return;
+                       }
 
-fi
+int
+main (void)
+{
 
+                       blk_queue_make_request(NULL, &make_request);
 
-# Check whether --with-udevruledir was given.
-if test "${with_udevruledir+set}" = set; then :
-  withval=$with_udevruledir; udevruledir=$withval
-else
-  udevruledir="${udevdir}/rules.d"
-fi
+  ;
+  return 0;
+}
 
+_ACEOF
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $udevdir;$udevruledir" >&5
-$as_echo "$udevdir;$udevruledir" >&6; }
+cat - <<_ACEOF >conftest.h
 
+_ACEOF
 
-       # Check whether --enable-systemd was given.
-if test "${enable_systemd+set}" = set; then :
-  enableval=$enable_systemd;
-else
-  enable_systemd=yes
-fi
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define MAKE_REQUEST_FN_RET void" >>confdefs.h
 
 
-# Check whether --with-systemdunitdir was given.
-if test "${with_systemdunitdir+set}" = set; then :
-  withval=$with_systemdunitdir; systemdunitdir=$withval
 else
-  systemdunitdir=/usr/lib/systemd/system
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether make_request_fn() returns blk_qc_t" >&5
+$as_echo_n "checking whether make_request_fn() returns blk_qc_t... " >&6; }
 
 
-# Check whether --with-systemdpresetdir was given.
-if test "${with_systemdpresetdir+set}" = set; then :
-  withval=$with_systemdpresetdir; systemdpresetdir=$withval
-else
-  systemdpresetdir=/usr/lib/systemd/system-preset
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
 
 
+                               #include <linux/blkdev.h>
 
-# Check whether --with-systemdmodulesloaddir was given.
-if test "${with_systemdmodulesloaddir+set}" = set; then :
-  withval=$with_systemdmodulesloaddir; systemdmoduleloaddir=$withval
-else
-  systemdmodulesloaddir=/usr/lib/modules-load.d
-fi
+                               blk_qc_t make_request(struct request_queue *q, struct bio *bio)
+                               {
+                                       return (BLK_QC_T_NONE);
+                               }
 
+int
+main (void)
+{
 
+                               blk_queue_make_request(NULL, &make_request);
 
-       if test "x$enable_systemd" = xyes; then :
+  ;
+  return 0;
+}
 
-               ZFS_INIT_SYSTEMD=systemd
-               ZFS_MODULE_LOAD=modules-load.d
-               modulesloaddir=$systemdmodulesloaddir
+_ACEOF
 
-fi
 
 
+cat - <<_ACEOF >conftest.h
 
+_ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
+$as_echo "#define MAKE_REQUEST_FN_RET blk_qc_t" >>confdefs.h
 
-       # Check whether --enable-sysvinit was given.
-if test "${enable_sysvinit+set}" = set; then :
-  enableval=$enable_sysvinit;
-else
-  enable_sysvinit=yes
-fi
 
+$as_echo "#define HAVE_MAKE_REQUEST_FN_RET_QC 1" >>confdefs.h
 
-       if test "x$enable_sysvinit" = xyes; then :
-  ZFS_INIT_SYSV=init.d
-fi
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+                               as_fn_error $? "no - Please file a bug report at
+                                   https://github.com/zfsonlinux/zfs/issues/new" "$LINENO" 5
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dracut directory" >&5
-$as_echo_n "checking for dracut directory... " >&6; }
 
-# Check whether --with-dracutdir was given.
-if test "${with_dracutdir+set}" = set; then :
-  withval=$with_dracutdir; dracutdir=$withval
-else
-  dracutdir=check
 fi
+       rm -Rf build
 
 
-       if test "x$dracutdir" = xcheck; then :
-
-               path1=/usr/share/dracut
-               path2=/usr/lib/dracut
-               default=$path2
 
-               if test -d "$path1"; then :
-  dracutdir="$path1"
-else
 
-                       if test -d "$path2"; then :
-  dracutdir="$path2"
-else
-  dracutdir="$default"
-fi
 
 fi
+       rm -Rf build
 
-fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dracutdir" >&5
-$as_echo "$dracutdir" >&6; }
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target asm dir" >&5
-$as_echo_n "checking for target asm dir... " >&6; }
-       TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/`
+fi
+       rm -Rf build
 
-       case $TARGET_ARCH in
-       i386|x86_64)
-               TARGET_ASM_DIR=asm-${TARGET_ARCH}
-               ;;
-       *)
-               TARGET_ASM_DIR=asm-generic
-               ;;
-       esac
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_ASM_DIR" >&5
-$as_echo "$TARGET_ASM_DIR" >&6; }
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether generic IO accounting symbols are avaliable" >&5
+$as_echo_n "checking whether generic IO accounting symbols are avaliable... " >&6; }
 
-       ZLIB=
 
-       ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = xyes; then :
 
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "
-       *** zlib.h missing, zlib-devel package required
-See \`config.log' for more details" "$LINENO" 5; }
-fi
+cat confdefs.h - <<_ACEOF >conftest.c
 
 
+               #include <linux/bio.h>
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5
-$as_echo_n "checking for compress2 in -lz... " >&6; }
-if ${ac_cv_lib_z_compress2+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+               void (*generic_start_io_acct_f)(int, unsigned long,
+                   struct hd_struct *) = &generic_start_io_acct;
+               void (*generic_end_io_acct_f)(int, struct hd_struct *,
+                   unsigned long) = &generic_end_io_acct;
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char compress2 ();
 int
-main ()
+main (void)
 {
-return compress2 ();
+
+               generic_start_io_acct(0, 0, NULL);
+               generic_end_io_acct(0, NULL, 0);
+
   ;
   return 0;
 }
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_compress2=yes
-else
-  ac_cv_lib_z_compress2=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5
-$as_echo "$ac_cv_lib_z_compress2" >&6; }
-if test "x$ac_cv_lib_z_compress2" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
 
-  LIBS="-lz $LIBS"
+_ACEOF
 
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "
-       *** compress2() missing, zlib-devel package required
-See \`config.log' for more details" "$LINENO" 5; }
-fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
-$as_echo_n "checking for uncompress in -lz... " >&6; }
-if ${ac_cv_lib_z_uncompress+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+cat - <<_ACEOF >conftest.h
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uncompress ();
-int
-main ()
-{
-return uncompress ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_uncompress=yes
-else
-  ac_cv_lib_z_uncompress=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
-$as_echo "$ac_cv_lib_z_uncompress" >&6; }
-if test "x$ac_cv_lib_z_uncompress" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
 _ACEOF
 
-  LIBS="-lz $LIBS"
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  rc=0
 else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "
-       *** uncompress() missing, zlib-devel package required
-See \`config.log' for more details" "$LINENO" 5; }
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
+
+
 fi
+       rm -Rf build
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crc32 in -lz" >&5
-$as_echo_n "checking for crc32 in -lz... " >&6; }
-if ${ac_cv_lib_z_crc32+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]generic_start_io_acct[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in block/bio.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(generic_start_io_acct)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_GENERIC_IO_ACCT 1" >>confdefs.h
+
+
+               fi
+       fi
+
+
+
+       if test "$LINUX_OBJ" != "$LINUX"; then :
+
+               KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char crc32 ();
-int
-main ()
-{
-return crc32 ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_z_crc32=yes
-else
-  ac_cv_lib_z_crc32=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+
+
+                       KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_UNUSED_BUT_SET_VARIABLE"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS $NO_BOOL_COMPARE"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS -DHAVE_SPL -D_KERNEL"
+       KERNELCPPFLAGS="$KERNELCPPFLAGS -DTEXT_DOMAIN=\\\"zfs-linux-kernel\\\""
+
+
+ ;;
+               user)
+
+
+# Check whether --with-mounthelperdir was given.
+if test "${with_mounthelperdir+set}" = set; then :
+  withval=$with_mounthelperdir; mounthelperdir=$withval
+else
+  mounthelperdir=/sbin
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_crc32" >&5
-$as_echo "$ac_cv_lib_z_crc32" >&6; }
-if test "x$ac_cv_lib_z_crc32" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
 
-  LIBS="-lz $LIBS"
 
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for udev directories" >&5
+$as_echo_n "checking for udev directories... " >&6; }
+
+# Check whether --with-udevdir was given.
+if test "${with_udevdir+set}" = set; then :
+  withval=$with_udevdir; udevdir=$withval
 else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "
-       *** crc32() missing, zlib-devel package required
-See \`config.log' for more details" "$LINENO" 5; }
+  udevdir=check
 fi
 
 
-       ZLIB="-lz"
+       if test "x$udevdir" = xcheck; then :
 
+               path1=/lib/udev
+               path2=/usr/lib/udev
+               default=$path2
 
-$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
+               if test -d "$path1"; then :
+  udevdir="$path1"
+else
 
+                       if test -d "$path2"; then :
+  udevdir="$path2"
+else
+  udevdir="$default"
+fi
 
+fi
 
-       LIBUUID=
+fi
 
-       ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
-if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
 
+# Check whether --with-udevruledir was given.
+if test "${with_udevruledir+set}" = set; then :
+  withval=$with_udevruledir; udevruledir=$withval
 else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "
-       *** uuid/uuid.h missing, libuuid-devel package required
-See \`config.log' for more details" "$LINENO" 5; }
+  udevruledir="${udevdir}/rules.d"
 fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
-$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
-if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
-  $as_echo_n "(cached) " >&6
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $udevdir;$udevruledir" >&5
+$as_echo "$udevdir;$udevruledir" >&6; }
+
+
+       # Check whether --enable-systemd was given.
+if test "${enable_systemd+set}" = set; then :
+  enableval=$enable_systemd;
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  enable_systemd=yes
+fi
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uuid_generate ();
-int
-main ()
-{
-return uuid_generate ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_uuid_uuid_generate=yes
+
+
+# Check whether --with-systemdunitdir was given.
+if test "${with_systemdunitdir+set}" = set; then :
+  withval=$with_systemdunitdir; systemdunitdir=$withval
 else
-  ac_cv_lib_uuid_uuid_generate=no
+  systemdunitdir=/usr/lib/systemd/system
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+
+
+# Check whether --with-systemdpresetdir was given.
+if test "${with_systemdpresetdir+set}" = set; then :
+  withval=$with_systemdpresetdir; systemdpresetdir=$withval
+else
+  systemdpresetdir=/usr/lib/systemd/system-preset
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
-$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
-if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUUID 1
-_ACEOF
 
-  LIBS="-luuid $LIBS"
 
+
+# Check whether --with-systemdmodulesloaddir was given.
+if test "${with_systemdmodulesloaddir+set}" = set; then :
+  withval=$with_systemdmodulesloaddir; systemdmoduleloaddir=$withval
 else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "
-       *** uuid_generate() missing, libuuid-devel package required
-See \`config.log' for more details" "$LINENO" 5; }
+  systemdmodulesloaddir=/usr/lib/modules-load.d
 fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_is_null in -luuid" >&5
-$as_echo_n "checking for uuid_is_null in -luuid... " >&6; }
-if ${ac_cv_lib_uuid_uuid_is_null+:} false; then :
-  $as_echo_n "(cached) " >&6
+
+       if test "x$enable_systemd" = xyes; then :
+
+               ZFS_INIT_SYSTEMD=systemd
+               ZFS_MODULE_LOAD=modules-load.d
+               modulesloaddir=$systemdmodulesloaddir
+
+fi
+
+
+
+
+
+
+
+
+       # Check whether --enable-sysvinit was given.
+if test "${enable_sysvinit+set}" = set; then :
+  enableval=$enable_sysvinit;
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-luuid  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+  enable_sysvinit=yes
+fi
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char uuid_is_null ();
-int
-main ()
-{
-return uuid_is_null ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_uuid_uuid_is_null=yes
+
+       if test "x$enable_sysvinit" = xyes; then :
+  ZFS_INIT_SYSV=init.d
+fi
+
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dracut directory" >&5
+$as_echo_n "checking for dracut directory... " >&6; }
+
+# Check whether --with-dracutdir was given.
+if test "${with_dracutdir+set}" = set; then :
+  withval=$with_dracutdir; dracutdir=$withval
+else
+  dracutdir=check
+fi
+
+
+       if test "x$dracutdir" = xcheck; then :
+
+               path1=/usr/share/dracut
+               path2=/usr/lib/dracut
+               default=$path2
+
+               if test -d "$path1"; then :
+  dracutdir="$path1"
+else
+
+                       if test -d "$path2"; then :
+  dracutdir="$path2"
+else
+  dracutdir="$default"
+fi
+
+fi
+
+fi
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dracutdir" >&5
+$as_echo "$dracutdir" >&6; }
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target asm dir" >&5
+$as_echo_n "checking for target asm dir... " >&6; }
+       TARGET_ARCH=`echo ${target_cpu} | sed -e s/i.86/i386/`
+
+       case $TARGET_ARCH in
+       i386|x86_64)
+               TARGET_ASM_DIR=asm-${TARGET_ARCH}
+               ;;
+       *)
+               TARGET_ASM_DIR=asm-generic
+               ;;
+       esac
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TARGET_ASM_DIR" >&5
+$as_echo "$TARGET_ASM_DIR" >&6; }
+
+
+       ZLIB=
+
+       ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_zlib_h" = xyes; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "
+       *** zlib.h missing, zlib-devel package required
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress2 in -lz" >&5
+$as_echo_n "checking for compress2 in -lz... " >&6; }
+if ${ac_cv_lib_z_compress2+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char compress2 ();
+int
+main ()
+{
+return compress2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_compress2=yes
+else
+  ac_cv_lib_z_compress2=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress2" >&5
+$as_echo "$ac_cv_lib_z_compress2" >&6; }
+if test "x$ac_cv_lib_z_compress2" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "
+       *** compress2() missing, zlib-devel package required
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uncompress in -lz" >&5
+$as_echo_n "checking for uncompress in -lz... " >&6; }
+if ${ac_cv_lib_z_uncompress+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uncompress ();
+int
+main ()
+{
+return uncompress ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_uncompress=yes
+else
+  ac_cv_lib_z_uncompress=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_uncompress" >&5
+$as_echo "$ac_cv_lib_z_uncompress" >&6; }
+if test "x$ac_cv_lib_z_uncompress" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "
+       *** uncompress() missing, zlib-devel package required
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crc32 in -lz" >&5
+$as_echo_n "checking for crc32 in -lz... " >&6; }
+if ${ac_cv_lib_z_crc32+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char crc32 ();
+int
+main ()
+{
+return crc32 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_crc32=yes
+else
+  ac_cv_lib_z_crc32=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_crc32" >&5
+$as_echo "$ac_cv_lib_z_crc32" >&6; }
+if test "x$ac_cv_lib_z_crc32" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "
+       *** crc32() missing, zlib-devel package required
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+
+       ZLIB="-lz"
+
+
+$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
+
+
+
+       LIBUUID=
+
+       ac_fn_c_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default"
+if test "x$ac_cv_header_uuid_uuid_h" = xyes; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "
+       *** uuid/uuid.h missing, libuuid-devel package required
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5
+$as_echo_n "checking for uuid_generate in -luuid... " >&6; }
+if ${ac_cv_lib_uuid_uuid_generate+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-luuid  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_generate ();
+int
+main ()
+{
+return uuid_generate ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_uuid_uuid_generate=yes
+else
+  ac_cv_lib_uuid_uuid_generate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5
+$as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBUUID 1
+_ACEOF
+
+  LIBS="-luuid $LIBS"
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "
+       *** uuid_generate() missing, libuuid-devel package required
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_is_null in -luuid" >&5
+$as_echo_n "checking for uuid_is_null in -luuid... " >&6; }
+if ${ac_cv_lib_uuid_uuid_is_null+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-luuid  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char uuid_is_null ();
+int
+main ()
+{
+return uuid_is_null ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_uuid_uuid_is_null=yes
 else
   ac_cv_lib_uuid_uuid_is_null=no
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_is_null" >&5
+$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; }
+if test "x$ac_cv_lib_uuid_uuid_is_null" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBUUID 1
+_ACEOF
+
+  LIBS="-luuid $LIBS"
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "
+       *** uuid_is_null() missing, libuuid-devel package required
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+
+       LIBUUID="-luuid"
+
+
+$as_echo "#define HAVE_LIBUUID 1" >>confdefs.h
+
+
+
+
+# Check whether --with-blkid was given.
+if test "${with_blkid+set}" = set; then :
+  withval=$with_blkid;
+else
+  with_blkid=check
+fi
+
+
+       LIBBLKID=
+       if test "x$with_blkid" = xyes; then :
+
+               LIBBLKID="-lblkid"
+
+
+$as_echo "#define HAVE_LIBBLKID 1" >>confdefs.h
+
+
+fi
+
+       if test "x$with_blkid" = xcheck; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid_get_cache in -lblkid" >&5
+$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; }
+if ${ac_cv_lib_blkid_blkid_get_cache+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lblkid  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char blkid_get_cache ();
+int
+main ()
+{
+return blkid_get_cache ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_blkid_blkid_get_cache=yes
+else
+  ac_cv_lib_blkid_blkid_get_cache=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
+$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
+if test "x$ac_cv_lib_blkid_blkid_get_cache" = xyes; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid zfs support" >&5
+$as_echo_n "checking for blkid zfs support... " >&6; }
+
+                       ZFS_DEV=`mktemp`
+                       truncate -s 64M $ZFS_DEV
+                       echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
+                               dd of=$ZFS_DEV bs=1k count=8 \
+                               seek=128 conv=notrunc &>/dev/null \
+                               >/dev/null 2>/dev/null
+                       echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
+                               dd of=$ZFS_DEV bs=1k count=8 \
+                               seek=132 conv=notrunc &>/dev/null \
+                               >/dev/null 2>/dev/null
+                       echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
+                               dd of=$ZFS_DEV bs=1k count=8 \
+                               seek=136 conv=notrunc &>/dev/null \
+                               >/dev/null 2>/dev/null
+                       echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
+                               dd of=$ZFS_DEV bs=1k count=8 \
+                               seek=140 conv=notrunc &>/dev/null \
+                               >/dev/null 2>/dev/null
+
+                       saved_LIBS="$LIBS"
+                       LIBS="-lblkid"
+
+                       if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+                               #include <stdio.h>
+                               #include <stdlib.h>
+                               #include <blkid/blkid.h>
+
+int
+main ()
+{
+
+                               blkid_cache cache;
+                               char *value;
+
+                               if (blkid_get_cache(&cache, NULL) < 0)
+                                       return 1;
+
+                               value = blkid_get_tag_value(cache, "TYPE",
+                                                           "$ZFS_DEV");
+                               if (!value) {
+                                       blkid_put_cache(cache);
+                                       return 2;
+                               }
+
+                               if (strcmp(value, "zfs_member")) {
+                                       free(value);
+                                       blkid_put_cache(cache);
+                                       return 0;
+                               }
+
+                               free(value);
+                               blkid_put_cache(cache);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+                               rm -f $ZFS_DEV
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                               LIBBLKID="-lblkid"
+
+
+$as_echo "#define HAVE_LIBBLKID 1" >>confdefs.h
+
+
+else
+
+                               rm -f $ZFS_DEV
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                               if test "x$with_blkid" != xcheck; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "--with-blkid given but unavailable
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+                       LIBS="$saved_LIBS"
+
+else
+
+                       if test "x$with_blkid" != xcheck; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "--with-blkid given but unavailable
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+
+fi
+
+
+fi
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wframe-larger-than=<size> support" >&5
+$as_echo_n "checking for -Wframe-larger-than=<size> support... " >&6; }
+
+       saved_flags="$CFLAGS"
+       CFLAGS="$CFLAGS -Wframe-larger-than=1024"
+
+       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+               FRAME_LARGER_THAN=-Wframe-larger-than=1024
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+               FRAME_LARGER_THAN=
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+       CFLAGS="$saved_flags"
+
+
+
+       if test "x$runstatedir" = x; then
+               runstatedir='${localstatedir}/run'
+
+       fi
+
+       for ac_func in mlockall
+do :
+  ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
+if test "x$ac_cv_func_mlockall" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MLOCKALL 1
+_ACEOF
+
+fi
+done
+
+   ;;
+               all)
+
+
+# Check whether --with-linux was given.
+if test "${with_linux+set}" = set; then :
+  withval=$with_linux; kernelsrc="$withval"
+fi
+
+
+
+# Check whether --with-linux-obj was given.
+if test "${with_linux_obj+set}" = set; then :
+  withval=$with_linux_obj; kernelbuild="$withval"
+fi
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel source directory" >&5
+$as_echo_n "checking kernel source directory... " >&6; }
+       if test -z "$kernelsrc"; then :
+
+               if test -e "/lib/modules/$(uname -r)/source"; then :
+
+                       headersdir="/lib/modules/$(uname -r)/source"
+                       sourcelink=$(readlink -f "$headersdir")
+
+elif test -e "/lib/modules/$(uname -r)/build"; then :
+
+                       headersdir="/lib/modules/$(uname -r)/build"
+                       sourcelink=$(readlink -f "$headersdir")
+
+else
+
+                       sourcelink=$(ls -1d /usr/src/kernels/* \
+                                    /usr/src/linux-* \
+                                    2>/dev/null | grep -v obj | tail -1)
+
+fi
+
+               if test -n "$sourcelink" && test -e ${sourcelink}; then :
+
+                       kernelsrc=`readlink -f ${sourcelink}`
+
+else
+
+                       kernelsrc="Not found"
+
+fi
+
+else
+
+               if test "$kernelsrc" = "NONE"; then :
+
+                       kernsrcver=NONE
+
+fi
+
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernelsrc" >&5
+$as_echo "$kernelsrc" >&6; }
+       if test ! -d "$kernelsrc"; then :
+
+               as_fn_error $? "
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed and then try again.  If that fails, you can specify the
+       *** location of the kernel source with the '--with-linux=PATH' option." "$LINENO" 5
+
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel build directory" >&5
+$as_echo_n "checking kernel build directory... " >&6; }
+       if test -z "$kernelbuild"; then :
+
+               if test -e "/lib/modules/$(uname -r)/build"; then :
+
+                       kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
+
+elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then :
+
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
+
+elif test -d ${kernelsrc}-obj/${target_cpu}/default; then :
+
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
+
+elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then :
+
+                       kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
+
+else
+
+                       kernelbuild=${kernelsrc}
+
+fi
+
+fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernelbuild" >&5
+$as_echo "$kernelbuild" >&6; }
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel source version" >&5
+$as_echo_n "checking kernel source version... " >&6; }
+       utsrelease1=$kernelbuild/include/linux/version.h
+       utsrelease2=$kernelbuild/include/linux/utsrelease.h
+       utsrelease3=$kernelbuild/include/generated/utsrelease.h
+       if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then :
+
+               utsrelease=linux/version.h
+
+elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then :
+
+               utsrelease=linux/utsrelease.h
+
+elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then :
+
+               utsrelease=generated/utsrelease.h
+
+fi
+
+       if test "$utsrelease"; then :
+
+               kernsrcver=`(echo "#include <$utsrelease>";
+                            echo "kernsrcver=UTS_RELEASE") |
+                            cpp -I $kernelbuild/include |
+                            grep "^kernsrcver=" | cut -d \" -f 2`
+
+               if test -z "$kernsrcver"; then :
+
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5
+$as_echo "Not found" >&6; }
+                       as_fn_error $? "*** Cannot determine kernel version." "$LINENO" 5
+
+fi
+
+else
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5
+$as_echo "Not found" >&6; }
+               if test "x$enable_linux_builtin" != xyes; then
+                       as_fn_error $? "*** Cannot find UTS_RELEASE definition." "$LINENO" 5
+               else
+                       as_fn_error $? "
+       *** Cannot find UTS_RELEASE definition.
+       *** Please run 'make prepare' inside the kernel source tree." "$LINENO" 5
+               fi
+
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernsrcver" >&5
+$as_echo "$kernsrcver" >&6; }
+
+       LINUX=${kernelsrc}
+       LINUX_OBJ=${kernelbuild}
+       LINUX_VERSION=${kernsrcver}
+
+
+
+
+
+
+       modpost=$LINUX/scripts/Makefile.modpost
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel file name for module symbols" >&5
+$as_echo_n "checking kernel file name for module symbols... " >&6; }
+       if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then :
+
+               if grep -q Modules.symvers $modpost; then :
+
+                       LINUX_SYMBOLS=Modules.symvers
+
+else
+
+                       LINUX_SYMBOLS=Module.symvers
+
+fi
+
+               if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then :
+
+                       as_fn_error $? "
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed.  If you are building with a custom kernel, make sure the
+       *** kernel is configured, built, and the '--with-linux=PATH' configure
+       *** option refers to the location of the kernel source." "$LINENO" 5
+
+fi
+
+else
+
+               LINUX_SYMBOLS=NONE
+
+fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_SYMBOLS" >&5
+$as_echo "$LINUX_SYMBOLS" >&6; }
+
+
+
+
+
+# Check whether --with-spl was given.
+if test "${with_spl+set}" = set; then :
+  withval=$with_spl; splsrc="$withval"
+fi
+
+
+
+# Check whether --with-spl-obj was given.
+if test "${with_spl_obj+set}" = set; then :
+  withval=$with_spl_obj; splbuild="$withval"
+fi
+
+
+
+# Check whether --with-spl-timeout was given.
+if test "${with_spl_timeout+set}" = set; then :
+  withval=$with_spl_timeout; timeout="$withval"
+else
+  timeout=0
+fi
+
+
+                                       splsrc0="/var/lib/dkms/spl/${VERSION}/build"
+       splsrc1="/usr/local/src/spl-${VERSION}/${LINUX_VERSION}"
+       splsrc2="/usr/local/src/spl-${VERSION}"
+       splsrc3="/usr/src/spl-${VERSION}/${LINUX_VERSION}"
+       splsrc4="/usr/src/spl-${VERSION}"
+       splsrc5="../spl/"
+       splsrc6="$LINUX"
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking spl source directory" >&5
+$as_echo_n "checking spl source directory... " >&6; }
+       if test -z "${splsrc}"; then :
+
+               if  test -e "${splsrc0}/spl.release.in"; then :
+
+                       splsrc=${splsrc0}
+
+elif  test -e "${splsrc1}/spl.release.in"; then :
+
+                       splsrc=${splsrc1}
+
+elif  test -e "${splsrc2}/spl.release.in"; then :
+
+                       splsrc=${splsrc2}
+
+elif  test -e "${splsrc3}/spl.release.in"; then :
+
+                       splsrc=$(readlink -f "${splsrc3}")
+
+elif  test -e "${splsrc4}/spl.release.in" ; then :
+
+                       splsrc=${splsrc4}
+
+elif  test -e "${splsrc5}/spl.release.in"; then :
+
+                       splsrc=$(readlink -f "${splsrc5}")
+
+elif  test -e "${splsrc6}/spl.release.in" ; then :
+
+                       splsrc=${splsrc6}
+
+else
+
+                       splsrc="Not found"
+
+fi
+
+else
+
+               if test "$splsrc" = "NONE"; then :
+
+                       splbuild=NONE
+                       splsrcver=NONE
+
+fi
+
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $splsrc" >&5
+$as_echo "$splsrc" >&6; }
+       if  test ! -e "$splsrc/spl.release.in"; then :
+
+               as_fn_error $? "
+       *** Please make sure the kmod spl devel package for your distribution
+       *** is installed then try again.  If that fails you can specify the
+       *** location of the spl source with the '--with-spl=PATH' option." "$LINENO" 5
+
+fi
+
+                                                                                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking spl build directory" >&5
+$as_echo_n "checking spl build directory... " >&6; }
+       while true; do
+               if test -z "$splbuild"; then :
+
+                       if  test -e "${splsrc}/${LINUX_VERSION}/spl_config.h" ; then :
+
+                               splbuild="${splsrc}/${LINUX_VERSION}"
+
+elif  test -e "${splsrc}/spl_config.h" ; then :
+
+                               splbuild="${splsrc}"
+
+elif  find -L "${splsrc}" -name spl_config.h 2> /dev/null | grep -wq spl_config.h ; then :
+
+                               splbuild=$(find -L "${splsrc}" -name spl_config.h | sed 's,/spl_config.h,,')
+
+else
+
+                               splbuild="Not found"
+
+fi
+
+fi
+               if test -e "$splbuild/spl_config.h" -o $timeout -le 0; then :
+
+                       break;
+
+else
+
+                       sleep 1
+                       timeout=$((timeout-1))
+
+fi
+       done
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $splbuild" >&5
+$as_echo "$splbuild" >&6; }
+       if  ! test -e "$splbuild/spl_config.h"; then :
+
+               as_fn_error $? "
+       *** Please make sure the kmod spl devel <kernel> package for your
+       *** distribution is installed then try again.  If that fails you
+       *** can specify the location of the spl objects with the
+       *** '--with-spl-obj=PATH' option." "$LINENO" 5
+
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking spl source version" >&5
+$as_echo_n "checking spl source version... " >&6; }
+       if test -r $splbuild/spl_config.h &&
+               fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then :
+
+
+               splsrcver=`(echo "#include <spl_config.h>";
+                           echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
+                           cpp -I $splbuild |
+                           grep "^splsrcver=" | tr -d \" | cut -d= -f2`
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_is_null" >&5
-$as_echo "$ac_cv_lib_uuid_uuid_is_null" >&6; }
-if test "x$ac_cv_lib_uuid_uuid_is_null" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBUUID 1
-_ACEOF
 
-  LIBS="-luuid $LIBS"
+       if test -z "$splsrcver"; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5
+$as_echo "Not found" >&6; }
+               as_fn_error $? "
+       *** Cannot determine the version of the spl source.
+       *** Please prepare the spl source before running this script" "$LINENO" 5
 
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "
-       *** uuid_is_null() missing, libuuid-devel package required
-See \`config.log' for more details" "$LINENO" 5; }
 fi
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $splsrcver" >&5
+$as_echo "$splsrcver" >&6; }
 
-       LIBUUID="-luuid"
+       SPL=${splsrc}
+       SPL_OBJ=${splbuild}
+       SPL_VERSION=${splsrcver}
 
 
-$as_echo "#define HAVE_LIBUUID 1" >>confdefs.h
 
 
 
+                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking spl file name for module symbols" >&5
+$as_echo_n "checking spl file name for module symbols... " >&6; }
+       SPL_SYMBOLS=NONE
 
-# Check whether --with-blkid was given.
-if test "${with_blkid+set}" = set; then :
-  withval=$with_blkid;
-else
-  with_blkid=check
-fi
+       while true; do
+               if test -r $SPL_OBJ/Module.symvers; then :
 
+                       SPL_SYMBOLS=Module.symvers
 
-       LIBBLKID=
-       if test "x$with_blkid" = xyes; then :
+elif test -r $SPL_OBJ/Modules.symvers; then :
 
-               LIBBLKID="-lblkid"
+                       SPL_SYMBOLS=Modules.symvers
+
+elif test -r $SPL_OBJ/module/Module.symvers; then :
 
+                       SPL_SYMBOLS=Module.symvers
 
-$as_echo "#define HAVE_LIBBLKID 1" >>confdefs.h
+elif test -r $SPL_OBJ/module/Modules.symvers; then :
 
+                       SPL_SYMBOLS=Modules.symvers
 
 fi
 
-       if test "x$with_blkid" = xcheck; then :
+               if test $SPL_SYMBOLS != NONE -o $timeout -le 0; then :
+
+                       break;
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid_get_cache in -lblkid" >&5
-$as_echo_n "checking for blkid_get_cache in -lblkid... " >&6; }
-if ${ac_cv_lib_blkid_blkid_get_cache+:} false; then :
-  $as_echo_n "(cached) " >&6
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lblkid  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char blkid_get_cache ();
+                       sleep 1
+                       timeout=$((timeout-1))
+
+fi
+       done
+
+       if test "$SPL_SYMBOLS" = NONE; then :
+
+               SPL_SYMBOLS=$LINUX_SYMBOLS
+
+fi
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPL_SYMBOLS" >&5
+$as_echo "$SPL_SYMBOLS" >&6; }
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modules can be built" >&5
+$as_echo_n "checking whether modules can be built... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
 int
-main ()
+main (void)
 {
-return blkid_get_cache ();
+
   ;
   return 0;
 }
+
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_blkid_blkid_get_cache=yes
+
+
+
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
 else
-  ac_cv_lib_blkid_blkid_get_cache=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               if test "x$enable_linux_builtin" != xyes; then
+                       as_fn_error $? "*** Unable to build an empty module." "$LINENO" 5
+               else
+                       as_fn_error $? "
+       *** Unable to build an empty module.
+       *** Please run 'make scripts' inside the kernel source tree." "$LINENO" 5
+               fi
+
+
+
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_blkid_blkid_get_cache" >&5
-$as_echo "$ac_cv_lib_blkid_blkid_get_cache" >&6; }
-if test "x$ac_cv_lib_blkid_blkid_get_cache" = xyes; then :
+       rm -Rf build
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for blkid zfs support" >&5
-$as_echo_n "checking for blkid zfs support... " >&6; }
 
-                       ZFS_DEV=`mktemp`
-                       truncate -s 64M $ZFS_DEV
-                       echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
-                               dd of=$ZFS_DEV bs=1k count=8 \
-                               seek=128 conv=notrunc &>/dev/null \
-                               >/dev/null 2>/dev/null
-                       echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
-                               dd of=$ZFS_DEV bs=1k count=8 \
-                               seek=132 conv=notrunc &>/dev/null \
-                               >/dev/null 2>/dev/null
-                       echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
-                               dd of=$ZFS_DEV bs=1k count=8 \
-                               seek=136 conv=notrunc &>/dev/null \
-                               >/dev/null 2>/dev/null
-                       echo -en "\x0c\xb1\xba\0\0\0\0\0" | \
-                               dd of=$ZFS_DEV bs=1k count=8 \
-                               seek=140 conv=notrunc &>/dev/null \
-                               >/dev/null 2>/dev/null
 
-                       saved_LIBS="$LIBS"
-                       LIBS="-lblkid"
 
-                       if test "$cross_compiling" = yes; then :
+       if test "x$cross_compiling" != xyes; then :
+
+               if test "$cross_compiling" = yes; then :
   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 as_fn_error $? "cannot run test program while cross compiling
@@ -21168,62 +22406,25 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-                               #include <stdio.h>
-                               #include <stdlib.h>
-                               #include <blkid/blkid.h>
+
+                               #include "$LINUX/include/linux/license.h"
 
 int
 main ()
 {
 
-                               blkid_cache cache;
-                               char *value;
-
-                               if (blkid_get_cache(&cache, NULL) < 0)
-                                       return 1;
-
-                               value = blkid_get_tag_value(cache, "TYPE",
-                                                           "$ZFS_DEV");
-                               if (!value) {
-                                       blkid_put_cache(cache);
-                                       return 2;
-                               }
-
-                               if (strcmp(value, "zfs_member")) {
-                                       free(value);
-                                       blkid_put_cache(cache);
-                                       return 0;
-                               }
-
-                               free(value);
-                               blkid_put_cache(cache);
+                               return !license_is_gpl_compatible("$ZFS_META_LICENSE");
 
   ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
 
-                               rm -f $ZFS_DEV
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                               LIBBLKID="-lblkid"
-
-
-$as_echo "#define HAVE_LIBBLKID 1" >>confdefs.h
-
 
-else
+$as_echo "#define ZFS_IS_GPL_COMPATIBLE 1" >>confdefs.h
 
-                               rm -f $ZFS_DEV
-                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-                               if test "x$with_blkid" != xcheck; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "--with-blkid given but unavailable
-See \`config.log' for more details" "$LINENO" 5; }
-fi
 
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
@@ -21231,502 +22432,561 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 fi
 
 
-                       LIBS="$saved_LIBS"
-
-else
-
-                       if test "x$with_blkid" != xcheck; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "--with-blkid given but unavailable
-See \`config.log' for more details" "$LINENO" 5; }
 fi
 
 
-fi
-
 
-fi
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC" >&5
+$as_echo_n "checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; }
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wframe-larger-than=<size> support" >&5
-$as_echo_n "checking for -Wframe-larger-than=<size> support... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.c
 
-       saved_flags="$CFLAGS"
-       CFLAGS="$CFLAGS -Wframe-larger-than=1024"
 
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+               #include <linux/module.h>
 
 int
-main ()
+main (void)
 {
 
+               #ifndef CONFIG_DEBUG_LOCK_ALLOC
+               #error CONFIG_DEBUG_LOCK_ALLOC not #defined
+               #endif
+
   ;
   return 0;
 }
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
 
-               FRAME_LARGER_THAN=-Wframe-larger-than=1024
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+_ACEOF
 
-else
 
-               FRAME_LARGER_THAN=
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+cat - <<_ACEOF >conftest.h
 
-       CFLAGS="$saved_flags"
+_ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
-       if test "x$runstatedir" = x; then
-               runstatedir='${localstatedir}/run'
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       fi
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mutex_lock() is GPL-only" >&5
+$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; }
+               tmp_flags="$EXTRA_KCFLAGS"
 
-       for ac_func in mlockall
-do :
-  ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall"
-if test "x$ac_cv_func_mlockall" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_MLOCKALL 1
-_ACEOF
 
-fi
-done
+cat confdefs.h - <<_ACEOF >conftest.c
 
-   ;;
-               all)
 
+                       #include <linux/module.h>
+                       #include <linux/mutex.h>
 
-# Check whether --with-linux was given.
-if test "${with_linux+set}" = set; then :
-  withval=$with_linux; kernelsrc="$withval"
-fi
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
 
+int
+main (void)
+{
 
+                       struct mutex lock;
 
-# Check whether --with-linux-obj was given.
-if test "${with_linux_obj+set}" = set; then :
-  withval=$with_linux_obj; kernelbuild="$withval"
-fi
+                       mutex_init(&lock);
+                       mutex_lock(&lock);
+                       mutex_unlock(&lock);
 
+  ;
+  return 0;
+}
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel source directory" >&5
-$as_echo_n "checking kernel source directory... " >&6; }
-       if test -z "$kernelsrc"; then :
+_ACEOF
 
-               if test -e "/lib/modules/$(uname -r)/source"; then :
 
-                       headersdir="/lib/modules/$(uname -r)/source"
-                       sourcelink=$(readlink -f "$headersdir")
 
-elif test -e "/lib/modules/$(uname -r)/build"; then :
+cat - <<_ACEOF >conftest.h
 
-                       headersdir="/lib/modules/$(uname -r)/build"
-                       sourcelink=$(readlink -f "$headersdir")
+_ACEOF
 
-else
 
-                       sourcelink=$(ls -1d /usr/src/kernels/* \
-                                    /usr/src/linux-* \
-                                    2>/dev/null | grep -v obj | tail -1)
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
-fi
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-               if test -n "$sourcelink" && test -e ${sourcelink}; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                       kernelsrc=`readlink -f ${sourcelink}`
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+                       as_fn_error $? "
+       *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
+       *** with the CDDL license and will prevent the module linking stage
+       *** from succeeding.  You must rebuild your kernel without this
+       *** option enabled." "$LINENO" 5
 
-else
 
-                       kernelsrc="Not found"
 
 fi
+       rm -Rf build
 
-else
 
-               if test "$kernelsrc" = "NONE"; then :
+               EXTRA_KCFLAGS="$tmp_flags"
 
-                       kernsrcver=NONE
 
-fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-fi
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernelsrc" >&5
-$as_echo "$kernelsrc" >&6; }
-       if test ! -d "$kernelsrc"; then :
 
-               as_fn_error $? "
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed and then try again.  If that fails, you can specify the
-       *** location of the kernel source with the '--with-linux=PATH' option." "$LINENO" 5
 
 fi
+       rm -Rf build
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel build directory" >&5
-$as_echo_n "checking kernel build directory... " >&6; }
-       if test -z "$kernelbuild"; then :
 
-               if test -e "/lib/modules/$(uname -r)/build"; then :
 
-                       kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
 
-elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then :
 
-                       kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
 
-elif test -d ${kernelsrc}-obj/${target_cpu}/default; then :
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="-I\$(src)"
 
-                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DECLARE_EVENT_CLASS() is available" >&5
+$as_echo_n "checking whether DECLARE_EVENT_CLASS() is available... " >&6; }
 
-elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then :
 
-                       kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
+cat confdefs.h - <<_ACEOF >conftest.c
 
-else
 
-                       kernelbuild=${kernelsrc}
+               #include <linux/module.h>
+               MODULE_LICENSE(ZFS_META_LICENSE);
 
-fi
+               #define CREATE_TRACE_POINTS
+               #include "conftest.h"
 
-fi
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernelbuild" >&5
-$as_echo "$kernelbuild" >&6; }
+int
+main (void)
+{
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel source version" >&5
-$as_echo_n "checking kernel source version... " >&6; }
-       utsrelease1=$kernelbuild/include/linux/version.h
-       utsrelease2=$kernelbuild/include/linux/utsrelease.h
-       utsrelease3=$kernelbuild/include/generated/utsrelease.h
-       if test -r $utsrelease1 && fgrep -q UTS_RELEASE $utsrelease1; then :
+               trace_zfs_autoconf_event_one(1UL);
+               trace_zfs_autoconf_event_two(2UL);
 
-               utsrelease=linux/version.h
+  ;
+  return 0;
+}
 
-elif test -r $utsrelease2 && fgrep -q UTS_RELEASE $utsrelease2; then :
+_ACEOF
 
-               utsrelease=linux/utsrelease.h
 
-elif test -r $utsrelease3 && fgrep -q UTS_RELEASE $utsrelease3; then :
 
-               utsrelease=generated/utsrelease.h
+cat - <<_ACEOF >conftest.h
 
-fi
+               #if !defined(_CONFTEST_H) || defined(TRACE_HEADER_MULTI_READ)
+               #define _CONFTEST_H
 
-       if test "$utsrelease"; then :
+               #undef  TRACE_SYSTEM
+               #define TRACE_SYSTEM zfs
+               #include <linux/tracepoint.h>
 
-               kernsrcver=`(echo "#include <$utsrelease>";
-                            echo "kernsrcver=UTS_RELEASE") |
-                            cpp -I $kernelbuild/include |
-                            grep "^kernsrcver=" | cut -d \" -f 2`
+               DECLARE_EVENT_CLASS(zfs_autoconf_event_class,
+                       TP_PROTO(unsigned long i),
+                       TP_ARGS(i),
+                       TP_STRUCT__entry(
+                               __field(unsigned long, i)
+                       ),
+                       TP_fast_assign(
+                               __entry->i = i;
+                       ),
+                       TP_printk("i = %lu", __entry->i)
+               );
 
-               if test -z "$kernsrcver"; then :
+               #define DEFINE_AUTOCONF_EVENT(name) \
+               DEFINE_EVENT(zfs_autoconf_event_class, name, \
+                       TP_PROTO(unsigned long i), \
+                       TP_ARGS(i))
+               DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_one);
+               DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_two);
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5
-$as_echo "Not found" >&6; }
-                       as_fn_error $? "*** Cannot determine kernel version." "$LINENO" 5
+               #endif /* _CONFTEST_H */
 
-fi
+               #undef  TRACE_INCLUDE_PATH
+               #define TRACE_INCLUDE_PATH .
+               #define TRACE_INCLUDE_FILE conftest
+               #include <trace/define_trace.h>
 
-else
+_ACEOF
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5
-$as_echo "Not found" >&6; }
-               if test "x$enable_linux_builtin" != xyes; then
-                       as_fn_error $? "*** Cannot find UTS_RELEASE definition." "$LINENO" 5
-               else
-                       as_fn_error $? "
-       *** Cannot find UTS_RELEASE definition.
-       *** Please run 'make prepare' inside the kernel source tree." "$LINENO" 5
-               fi
 
-fi
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kernsrcver" >&5
-$as_echo "$kernsrcver" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       LINUX=${kernelsrc}
-       LINUX_OBJ=${kernelbuild}
-       LINUX_VERSION=${kernsrcver}
+$as_echo "#define HAVE_DECLARE_EVENT_CLASS 1" >>confdefs.h
 
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
-       modpost=$LINUX/scripts/Makefile.modpost
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel file name for module symbols" >&5
-$as_echo_n "checking kernel file name for module symbols... " >&6; }
-       if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then :
+fi
+       rm -Rf build
 
-               if grep -q Modules.symvers $modpost; then :
 
-                       LINUX_SYMBOLS=Modules.symvers
+       EXTRA_KCFLAGS="$tmp_flags"
 
-else
 
-                       LINUX_SYMBOLS=Module.symvers
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current->bio_tail exists" >&5
+$as_echo_n "checking whether current->bio_tail exists... " >&6; }
 
-fi
 
-               if test ! -f "$LINUX_OBJ/$LINUX_SYMBOLS"; then :
+cat confdefs.h - <<_ACEOF >conftest.c
 
-                       as_fn_error $? "
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed.  If you are building with a custom kernel, make sure the
-       *** kernel is configured, built, and the '--with-linux=PATH' configure
-       *** option refers to the location of the kernel source." "$LINENO" 5
 
-fi
+               #include <linux/sched.h>
 
-else
+int
+main (void)
+{
 
-               LINUX_SYMBOLS=NONE
+               current->bio_tail = (struct bio **) NULL;
 
-fi
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINUX_SYMBOLS" >&5
-$as_echo "$LINUX_SYMBOLS" >&6; }
+  ;
+  return 0;
+}
 
+_ACEOF
 
 
 
+cat - <<_ACEOF >conftest.h
 
-# Check whether --with-spl was given.
-if test "${with_spl+set}" = set; then :
-  withval=$with_spl; splsrc="$withval"
-fi
+_ACEOF
 
 
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
-# Check whether --with-spl-obj was given.
-if test "${with_spl_obj+set}" = set; then :
-  withval=$with_spl_obj; splbuild="$withval"
-fi
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
+$as_echo "#define HAVE_CURRENT_BIO_TAIL 1" >>confdefs.h
 
 
-# Check whether --with-spl-timeout was given.
-if test "${with_spl_timeout+set}" = set; then :
-  withval=$with_spl_timeout; timeout="$withval"
 else
-  timeout=0
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current->bio_list exists" >&5
+$as_echo_n "checking whether current->bio_list exists... " >&6; }
 
-                                       splsrc0="/var/lib/dkms/spl/${VERSION}/build"
-       splsrc1="/usr/local/src/spl-${VERSION}/${LINUX_VERSION}"
-       splsrc2="/usr/local/src/spl-${VERSION}"
-       splsrc3="/usr/src/spl-${VERSION}/${LINUX_VERSION}"
-       splsrc4="/usr/src/spl-${VERSION}"
-       splsrc5="../spl/"
-       splsrc6="$LINUX"
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking spl source directory" >&5
-$as_echo_n "checking spl source directory... " >&6; }
-       if test -z "${splsrc}"; then :
+cat confdefs.h - <<_ACEOF >conftest.c
 
-               if  test -e "${splsrc0}/spl.release.in"; then :
 
-                       splsrc=${splsrc0}
+                       #include <linux/sched.h>
 
-elif  test -e "${splsrc1}/spl.release.in"; then :
+int
+main (void)
+{
 
-                       splsrc=${splsrc1}
+                       current->bio_list = (struct bio_list *) NULL;
 
-elif  test -e "${splsrc2}/spl.release.in"; then :
+  ;
+  return 0;
+}
 
-                       splsrc=${splsrc2}
+_ACEOF
 
-elif  test -e "${splsrc3}/spl.release.in"; then :
 
-                       splsrc=$(readlink -f "${splsrc3}")
 
-elif  test -e "${splsrc4}/spl.release.in" ; then :
+cat - <<_ACEOF >conftest.h
 
-                       splsrc=${splsrc4}
+_ACEOF
 
-elif  test -e "${splsrc5}/spl.release.in"; then :
 
-                       splsrc=$(readlink -f "${splsrc5}")
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
-elif  test -e "${splsrc6}/spl.release.in" ; then :
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_CURRENT_BIO_LIST 1" >>confdefs.h
 
-                       splsrc=${splsrc6}
 
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+                       as_fn_error $? "no - Please file a bug report at
+                           https://github.com/zfsonlinux/zfs/issues/new" "$LINENO" 5
+
 
-                       splsrc="Not found"
 
 fi
+       rm -Rf build
 
-else
 
-               if test "$splsrc" = "NONE"; then :
 
-                       splbuild=NONE
-                       splsrcver=NONE
 
-fi
 
 fi
+       rm -Rf build
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $splsrc" >&5
-$as_echo "$splsrc" >&6; }
-       if  test ! -e "$splsrc/spl.release.in"; then :
 
-               as_fn_error $? "
-       *** Please make sure the kmod spl devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the spl source with the '--with-spl=PATH' option." "$LINENO" 5
 
-fi
 
-                                                                                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking spl build directory" >&5
-$as_echo_n "checking spl build directory... " >&6; }
-       while true; do
-               if test -z "$splbuild"; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking block device operation prototypes" >&5
+$as_echo_n "checking block device operation prototypes... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
-                       if  test -e "${splsrc}/${LINUX_VERSION}/spl_config.h" ; then :
 
-                               splbuild="${splsrc}/${LINUX_VERSION}"
+cat confdefs.h - <<_ACEOF >conftest.c
 
-elif  test -e "${splsrc}/spl_config.h" ; then :
 
-                               splbuild="${splsrc}"
+               #include <linux/blkdev.h>
 
-elif  find -L "${splsrc}" -name spl_config.h 2> /dev/null | grep -wq spl_config.h ; then :
+               int blk_open(struct block_device *bdev, fmode_t mode)
+                   { return 0; }
+               int blk_ioctl(struct block_device *bdev, fmode_t mode,
+                   unsigned x, unsigned long y) { return 0; }
+               int blk_compat_ioctl(struct block_device * bdev, fmode_t mode,
+                   unsigned x, unsigned long y) { return 0; }
 
-                               splbuild=$(find -L "${splsrc}" -name spl_config.h | sed 's,/spl_config.h,,')
+               static const struct block_device_operations
+                   bops __attribute__ ((unused)) = {
+                       .open           = blk_open,
+                       .release        = NULL,
+                       .ioctl          = blk_ioctl,
+                       .compat_ioctl   = blk_compat_ioctl,
+               };
 
-else
+int
+main (void)
+{
 
-                               splbuild="Not found"
 
-fi
+  ;
+  return 0;
+}
 
-fi
-               if test -e "$splbuild/spl_config.h" -o $timeout -le 0; then :
+_ACEOF
 
-                       break;
 
-else
 
-                       sleep 1
-                       timeout=$((timeout-1))
+cat - <<_ACEOF >conftest.h
 
-fi
-       done
+_ACEOF
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $splbuild" >&5
-$as_echo "$splbuild" >&6; }
-       if  ! test -e "$splbuild/spl_config.h"; then :
 
-               as_fn_error $? "
-       *** Please make sure the kmod spl devel <kernel> package for your
-       *** distribution is installed then try again.  If that fails you
-       *** can specify the location of the spl objects with the
-       *** '--with-spl-obj=PATH' option." "$LINENO" 5
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
-fi
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: struct block_device" >&5
+$as_echo "struct block_device" >&6; }
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking spl source version" >&5
-$as_echo_n "checking spl source version... " >&6; }
-       if test -r $splbuild/spl_config.h &&
-               fgrep -q SPL_META_VERSION $splbuild/spl_config.h; then :
+$as_echo "#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: struct inode" >&5
+$as_echo "struct inode" >&6; }
 
 
-               splsrcver=`(echo "#include <spl_config.h>";
-                           echo "splsrcver=SPL_META_VERSION-SPL_META_RELEASE") |
-                           cpp -I $splbuild |
-                           grep "^splsrcver=" | tr -d \" | cut -d= -f2`
 
 fi
+       rm -Rf build
 
-       if test -z "$splsrcver"; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: Not found" >&5
-$as_echo "Not found" >&6; }
-               as_fn_error $? "
-       *** Cannot determine the version of the spl source.
-       *** Please prepare the spl source before running this script" "$LINENO" 5
+       EXTRA_KCFLAGS="$tmp_flags"
 
-fi
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $splsrcver" >&5
-$as_echo "$splsrcver" >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether block_device_operations.release is void" >&5
+$as_echo_n "checking whether block_device_operations.release is void... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
-       SPL=${splsrc}
-       SPL_OBJ=${splbuild}
-       SPL_VERSION=${splsrcver}
 
+cat confdefs.h - <<_ACEOF >conftest.c
 
 
+               #include <linux/blkdev.h>
 
+               void blk_release(struct gendisk *g, fmode_t mode) { return; }
 
-                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking spl file name for module symbols" >&5
-$as_echo_n "checking spl file name for module symbols... " >&6; }
-       SPL_SYMBOLS=NONE
+               static const struct block_device_operations
+                   bops __attribute__ ((unused)) = {
+                       .open           = NULL,
+                       .release        = blk_release,
+                       .ioctl          = NULL,
+                       .compat_ioctl   = NULL,
+               };
 
-       while true; do
-               if test -r $SPL_OBJ/Module.symvers; then :
+int
+main (void)
+{
 
-                       SPL_SYMBOLS=Module.symvers
 
-elif test -r $SPL_OBJ/Modules.symvers; then :
+  ;
+  return 0;
+}
 
-                       SPL_SYMBOLS=Modules.symvers
+_ACEOF
 
-elif test -r $SPL_OBJ/module/Module.symvers; then :
 
-                       SPL_SYMBOLS=Module.symvers
 
-elif test -r $SPL_OBJ/module/Modules.symvers; then :
+cat - <<_ACEOF >conftest.h
 
-                       SPL_SYMBOLS=Modules.symvers
+_ACEOF
 
-fi
 
-               if test $SPL_SYMBOLS != NONE -o $timeout -le 0; then :
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
 
-                       break;
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5
+$as_echo "void" >&6; }
 
-else
+$as_echo "#define HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID 1" >>confdefs.h
 
-                       sleep 1
-                       timeout=$((timeout-1))
 
-fi
-       done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       if test "$SPL_SYMBOLS" = NONE; then :
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
+$as_echo "int" >&6; }
 
-               SPL_SYMBOLS=$LINUX_SYMBOLS
 
-fi
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SPL_SYMBOLS" >&5
-$as_echo "$SPL_SYMBOLS" >&6; }
+fi
+       rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether modules can be built" >&5
-$as_echo_n "checking whether modules can be built... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel defines fmode_t" >&5
+$as_echo_n "checking whether kernel defines fmode_t... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
+               #include <linux/types.h>
+
 int
 main (void)
 {
 
+               fmode_t *ptr __attribute__ ((unused));
+
   ;
   return 0;
 }
@@ -21759,19 +23019,15 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
+$as_echo "#define HAVE_FMODE_T 1" >>confdefs.h
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-               if test "x$enable_linux_builtin" != xyes; then
-                       as_fn_error $? "*** Unable to build an empty module." "$LINENO" 5
-               else
-                       as_fn_error $? "
-       *** Unable to build an empty module.
-       *** Please run 'make scripts' inside the kernel source tree." "$LINENO" 5
-               fi
 
 
 
 
 
 
-       if test "x$cross_compiling" != xyes; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel defines KOBJ_NAME_LEN" >&5
+$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; }
 
-               if test "$cross_compiling" = yes; then :
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+
+cat confdefs.h - <<_ACEOF >conftest.c
 
 
-                               #include "$LINUX/include/linux/license.h"
+               #include <linux/kobject.h>
 
 int
-main ()
+main (void)
 {
 
-                               return !license_is_gpl_compatible("$ZFS_META_LICENSE");
+               int val __attribute__ ((unused));
+               val = KOBJ_NAME_LEN;
 
   ;
   return 0;
 }
 
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
 
 
-$as_echo "#define ZFS_IS_GPL_COMPATIBLE 1" >>confdefs.h
 
+cat - <<_ACEOF >conftest.h
+
+_ACEOF
+
+
+       rm -Rf build && mkdir -p build && touch build/conftest.mod.c
+       echo "obj-m := conftest.o" >build/Makefile
+       modpost_flag=''
+       test "x$enable_linux_builtin" = xyes && modpost_flag='modpost=true' # fake modpost stage
+       if { ac_try='cp conftest.c conftest.h build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; } >/dev/null && { ac_try='test -s build/conftest.o'
+  { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_KOBJ_NAME_LEN 1" >>confdefs.h
+
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
 
 
 fi
+       rm -Rf build
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC" >&5
-$as_echo_n "checking whether Linux was built with CONFIG_DEBUG_LOCK_ALLOC... " >&6; }
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get() wants 3 args" >&5
+$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/module.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               #ifndef CONFIG_DEBUG_LOCK_ALLOC
-               #error CONFIG_DEBUG_LOCK_ALLOC not #defined
-               #endif
+               struct block_device *bdev = NULL;
+               (void) blkdev_get(bdev, 0, NULL);
 
   ;
   return 0;
@@ -21871,28 +23151,38 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mutex_lock() is GPL-only" >&5
-$as_echo_n "checking whether mutex_lock() is GPL-only... " >&6; }
-               tmp_flags="$EXTRA_KCFLAGS"
+$as_echo "#define HAVE_3ARG_BLKDEV_GET 1" >>confdefs.h
 
 
-cat confdefs.h - <<_ACEOF >conftest.c
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
-                       #include <linux/module.h>
-                       #include <linux/mutex.h>
 
-                       MODULE_LICENSE("$ZFS_META_LICENSE");
+fi
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() is available" >&5
+$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-                       struct mutex lock;
-
-                       mutex_init(&lock);
-                       mutex_lock(&lock);
-                       mutex_unlock(&lock);
+               blkdev_get_by_path(NULL, 0, NULL);
 
   ;
   return 0;
@@ -21922,71 +23212,81 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
+  rc=0
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
-
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-                       as_fn_error $? "
-       *** Kernel built with CONFIG_DEBUG_LOCK_ALLOC which is incompatible
-       *** with the CDDL license and will prevent the module linking stage
-       *** from succeeding.  You must rebuild your kernel without this
-       *** option enabled." "$LINENO" 5
-
+ rc=1
 
 
 fi
        rm -Rf build
 
 
-               EXTRA_KCFLAGS="$tmp_flags"
+       if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+               fi
+               if test $rc -ne 0; then :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+               else :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-
-fi
-       rm -Rf build
-
-
+$as_echo "#define HAVE_BLKDEV_GET_BY_PATH 1" >>confdefs.h
 
 
+               fi
+       fi
 
 
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="-I\$(src)"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open_bdev_exclusive() is available" >&5
+$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; }
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DECLARE_EVENT_CLASS() is available" >&5
-$as_echo_n "checking whether DECLARE_EVENT_CLASS() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/module.h>
-               MODULE_LICENSE(ZFS_META_LICENSE);
-
-               #define CREATE_TRACE_POINTS
-               #include "conftest.h"
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               trace_zfs_autoconf_event_one(1UL);
-               trace_zfs_autoconf_event_two(2UL);
+               open_bdev_exclusive(NULL, 0, NULL);
 
   ;
   return 0;
@@ -21998,39 +23298,6 @@ _ACEOF
 
 cat - <<_ACEOF >conftest.h
 
-               #if !defined(_CONFTEST_H) || defined(TRACE_HEADER_MULTI_READ)
-               #define _CONFTEST_H
-
-               #undef  TRACE_SYSTEM
-               #define TRACE_SYSTEM zfs
-               #include <linux/tracepoint.h>
-
-               DECLARE_EVENT_CLASS(zfs_autoconf_event_class,
-                       TP_PROTO(unsigned long i),
-                       TP_ARGS(i),
-                       TP_STRUCT__entry(
-                               __field(unsigned long, i)
-                       ),
-                       TP_fast_assign(
-                               __entry->i = i;
-                       ),
-                       TP_printk("i = %lu", __entry->i)
-               );
-
-               #define DEFINE_AUTOCONF_EVENT(name) \
-               DEFINE_EVENT(zfs_autoconf_event_class, name, \
-                       TP_PROTO(unsigned long i), \
-                       TP_ARGS(i))
-               DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_one);
-               DEFINE_AUTOCONF_EVENT(zfs_autoconf_event_two);
-
-               #endif /* _CONFTEST_H */
-
-               #undef  TRACE_INCLUDE_PATH
-               #define TRACE_INCLUDE_PATH .
-               #define TRACE_INCLUDE_FILE conftest
-               #include <trace/define_trace.h>
-
 _ACEOF
 
 
@@ -22049,43 +23316,81 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_DECLARE_EVENT_CLASS 1" >>confdefs.h
+fi
+       rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       if test $rc -ne 0; then :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-fi
-       rm -Rf build
+               else :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       EXTRA_KCFLAGS="$tmp_flags"
+$as_echo "#define HAVE_OPEN_BDEV_EXCLUSIVE 1" >>confdefs.h
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current->bio_tail exists" >&5
-$as_echo_n "checking whether current->bio_tail exists... " >&6; }
+               fi
+       fi
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lookup_bdev() is available" >&5
+$as_echo_n "checking whether lookup_bdev() is available... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/sched.h>
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
-               current->bio_tail = (struct bio **) NULL;
+               lookup_bdev(NULL);
 
   ;
   return 0;
@@ -22115,33 +23420,82 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CURRENT_BIO_TAIL 1" >>confdefs.h
+fi
+       rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       if test $rc -ne 0; then :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current->bio_list exists" >&5
-$as_echo_n "checking whether current->bio_list exists... " >&6; }
+
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in fs/block_dev.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+               else :
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_LOOKUP_BDEV 1" >>confdefs.h
+
+
+               fi
+       fi
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether invalidate_bdev() wants 1 arg" >&5
+$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-                       #include <linux/sched.h>
+               #include <linux/buffer_head.h>
 
 int
 main (void)
 {
 
-                       current->bio_list = (struct bio_list *) NULL;
+               struct block_device *bdev = NULL;
+               invalidate_bdev(bdev);
 
   ;
   return 0;
@@ -22172,25 +23526,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CURRENT_BIO_LIST 1" >>confdefs.h
+$as_echo "#define HAVE_1ARG_INVALIDATE_BDEV 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       as_fn_error $? "no - Please file a bug report at
-                           https://github.com/zfsonlinux/zfs/issues/new" "$LINENO" 5
-
-
-
-fi
-       rm -Rf build
-
-
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -22200,8 +23547,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking block device operation prototypes" >&5
-$as_echo_n "checking block device operation prototypes... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_logical_block_size() is available" >&5
+$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; }
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
@@ -22211,25 +23558,12 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/blkdev.h>
 
-               int blk_open(struct block_device *bdev, fmode_t mode)
-                   { return 0; }
-               int blk_ioctl(struct block_device *bdev, fmode_t mode,
-                   unsigned x, unsigned long y) { return 0; }
-               int blk_compat_ioctl(struct block_device * bdev, fmode_t mode,
-                   unsigned x, unsigned long y) { return 0; }
-
-               static const struct block_device_operations
-                   bops __attribute__ ((unused)) = {
-                       .open           = blk_open,
-                       .release        = NULL,
-                       .ioctl          = blk_ioctl,
-                       .compat_ioctl   = blk_compat_ioctl,
-               };
-
 int
 main (void)
 {
 
+               struct block_device *bdev = NULL;
+               bdev_logical_block_size(bdev);
 
   ;
   return 0;
@@ -22260,18 +23594,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: struct block_device" >&5
-$as_echo "struct block_device" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BDEV_BLOCK_DEVICE_OPERATIONS 1" >>confdefs.h
+$as_echo "#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: struct inode" >&5
-$as_echo "struct inode" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -22282,8 +23616,8 @@ fi
        EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether block_device_operations.release is void" >&5
-$as_echo_n "checking whether block_device_operations.release is void... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_physical_block_size() is available" >&5
+$as_echo_n "checking whether bdev_physical_block_size() is available... " >&6; }
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
@@ -22293,20 +23627,12 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/blkdev.h>
 
-               void blk_release(struct gendisk *g, fmode_t mode) { return; }
-
-               static const struct block_device_operations
-                   bops __attribute__ ((unused)) = {
-                       .open           = NULL,
-                       .release        = blk_release,
-                       .ioctl          = NULL,
-                       .compat_ioctl   = NULL,
-               };
-
 int
 main (void)
 {
 
+               struct block_device *bdev = NULL;
+               bdev_physical_block_size(bdev);
 
   ;
   return 0;
@@ -22337,18 +23663,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: void" >&5
-$as_echo "void" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID 1" >>confdefs.h
+$as_echo "#define HAVE_BDEV_PHYSICAL_BLOCK_SIZE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: int" >&5
-$as_echo "int" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
 
        EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel defines fmode_t" >&5
-$as_echo_n "checking whether kernel defines fmode_t... " >&6; }
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio has bi_iter" >&5
+$as_echo_n "checking whether bio has bi_iter... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/types.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               fmode_t *ptr __attribute__ ((unused));
+               struct bio bio;
+               bio.bi_iter.bi_sector = 0;
 
   ;
   return 0;
@@ -22405,7 +23733,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_FMODE_T 1" >>confdefs.h
+$as_echo "#define HAVE_BIO_BVEC_ITER 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel defines KOBJ_NAME_LEN" >&5
-$as_echo_n "checking whether kernel defines KOBJ_NAME_LEN... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_FAILFAST_* are defined" >&5
+$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/kobject.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               int val __attribute__ ((unused));
-               val = KOBJ_NAME_LEN;
+               int flags __attribute__ ((unused));
+               flags = ((1 << BIO_RW_FAILFAST_DEV) |
+                        (1 << BIO_RW_FAILFAST_TRANSPORT) |
+                        (1 << BIO_RW_FAILFAST_DRIVER));
 
   ;
   return 0;
@@ -22471,7 +23801,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_KOBJ_NAME_LEN 1" >>confdefs.h
+$as_echo "#define HAVE_BIO_RW_FAILFAST_DTD 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get() wants 3 args" >&5
-$as_echo_n "checking whether blkdev_get() wants 3 args... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_FAILFAST_MASK is defined" >&5
+$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               struct block_device *bdev = NULL;
-               (void) blkdev_get(bdev, 0, NULL);
+               int flags __attribute__ ((unused));
+               flags = REQ_FAILFAST_MASK;
 
   ;
   return 0;
@@ -22537,7 +23867,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_3ARG_BLKDEV_GET 1" >>confdefs.h
+$as_echo "#define HAVE_REQ_FAILFAST_MASK 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blkdev_get_by_path() is available" >&5
-$as_echo_n "checking whether blkdev_get_by_path() is available... " >&6; }
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_end_io_t wants 1 arg" >&5
+$as_echo_n "checking whether bio_end_io_t wants 1 arg... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
+               #include <linux/bio.h>
+
+               void wanted_end_io(struct bio *bio) { return; }
+
+               bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
 
 int
 main (void)
 {
 
-               blkdev_get_by_path(NULL, 0, NULL);
 
   ;
   return 0;
@@ -22598,81 +23931,43 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-       rm -Rf build
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+$as_echo "#define HAVE_1ARG_BIO_END_IO_T 1" >>confdefs.h
 
-       grep -q -E '[[:space:]]blkdev_get_by_path[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(blkdev_get_by_path)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BLKDEV_GET_BY_PATH 1" >>confdefs.h
 
+fi
+       rm -Rf build
 
-               fi
-       fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open_bdev_exclusive() is available" >&5
-$as_echo_n "checking whether open_bdev_exclusive() is available... " >&6; }
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_BARRIER is defined" >&5
+$as_echo_n "checking whether BIO_RW_BARRIER is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               open_bdev_exclusive(NULL, 0, NULL);
+               int flags __attribute__ ((unused));
+               flags = BIO_RW_BARRIER;
 
   ;
   return 0;
@@ -22702,81 +23997,43 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-       rm -Rf build
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+$as_echo "#define HAVE_BIO_RW_BARRIER 1" >>confdefs.h
 
-       grep -q -E '[[:space:]]open_bdev_exclusive[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(open_bdev_exclusive)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_OPEN_BDEV_EXCLUSIVE 1" >>confdefs.h
 
+fi
+       rm -Rf build
 
-               fi
-       fi
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lookup_bdev() is available" >&5
-$as_echo_n "checking whether lookup_bdev() is available... " >&6; }
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_DISCARD is defined" >&5
+$as_echo_n "checking whether BIO_RW_DISCARD is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               lookup_bdev(NULL);
+               int flags __attribute__ ((unused));
+               flags = BIO_RW_DISCARD;
 
   ;
   return 0;
@@ -22806,82 +24063,45 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-       rm -Rf build
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-       else
-               if test "x$enable_linux_builtin" != xyes; then
+$as_echo "#define HAVE_BIO_RW_DISCARD 1" >>confdefs.h
 
-       grep -q -E '[[:space:]]lookup_bdev[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in fs/block_dev.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(lookup_bdev)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
 
-               fi
-               if test $rc -ne 0; then :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-               else :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_LOOKUP_BDEV 1" >>confdefs.h
 
+fi
+       rm -Rf build
 
-               fi
-       fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether invalidate_bdev() wants 1 arg" >&5
-$as_echo_n "checking whether invalidate_bdev() wants 1 arg... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_flush() is available" >&5
+$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/buffer_head.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               struct block_device *bdev = NULL;
-               invalidate_bdev(bdev);
+               struct request_queue *q = NULL;
+               (void) blk_queue_flush(q, REQ_FLUSH);
 
   ;
   return 0;
@@ -22915,7 +24135,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_1ARG_INVALIDATE_BDEV 1" >>confdefs.h
+$as_echo "#define HAVE_BLK_QUEUE_FLUSH 1" >>confdefs.h
 
 
 else
 
 
 
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_logical_block_size() is available" >&5
-$as_echo_n "checking whether bdev_logical_block_size() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_flush() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
+               #include <linux/module.h>
                #include <linux/blkdev.h>
 
+               MODULE_LICENSE("$ZFS_META_LICENSE");
+
 int
 main (void)
 {
 
-               struct block_device *bdev = NULL;
-               bdev_logical_block_size(bdev);
+               struct request_queue *q = NULL;
+               (void) blk_queue_flush(q, REQ_FLUSH);
 
   ;
   return 0;
@@ -22980,18 +24200,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_BDEV_LOGICAL_BLOCK_SIZE 1" >>confdefs.h
-
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1" >>confdefs.h
+
 
 
 
@@ -23002,8 +24222,8 @@ fi
        EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bdev_physical_block_size() is available" >&5
-$as_echo_n "checking whether bdev_physical_block_size() is available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_hw_sectors() is available" >&5
+$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
        tmp_flags="$EXTRA_KCFLAGS"
        EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
@@ -23017,8 +24237,8 @@ int
 main (void)
 {
 
-               struct block_device *bdev = NULL;
-               bdev_physical_block_size(bdev);
+               struct request_queue *q = NULL;
+               (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
 
   ;
   return 0;
@@ -23052,7 +24272,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BDEV_PHYSICAL_BLOCK_SIZE 1" >>confdefs.h
+$as_echo "#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1" >>confdefs.h
 
 
 else
        EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio has bi_iter" >&5
-$as_echo_n "checking whether bio has bi_iter... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_segments() is available" >&5
+$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/bio.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               struct bio bio;
-               bio.bi_iter.bi_sector = 0;
+               struct request_queue *q = NULL;
+               (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
 
   ;
   return 0;
@@ -23119,7 +24341,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BIO_BVEC_ITER 1" >>confdefs.h
+$as_echo "#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1" >>confdefs.h
 
 
 else
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_FAILFAST_* are defined" >&5
-$as_echo_n "checking whether BIO_RW_FAILFAST_* are defined... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether get_disk_ro() is available" >&5
+$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
+       tmp_flags="$EXTRA_KCFLAGS"
+       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/bio.h>
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = ((1 << BIO_RW_FAILFAST_DEV) |
-                        (1 << BIO_RW_FAILFAST_TRANSPORT) |
-                        (1 << BIO_RW_FAILFAST_DRIVER));
+               struct gendisk *disk = NULL;
+               (void) get_disk_ro(disk);
 
   ;
   return 0;
@@ -23187,7 +24410,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BIO_RW_FAILFAST_DTD 1" >>confdefs.h
+$as_echo "#define HAVE_GET_DISK_RO 1" >>confdefs.h
 
 
 else
        rm -Rf build
 
 
+       EXTRA_KCFLAGS="$tmp_flags"
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether get_gendisk() is available" >&5
+$as_echo_n "checking whether get_gendisk() is available... " >&6; }
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_FAILFAST_MASK is defined" >&5
-$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/bio.h>
+               #include <linux/genhd.h>
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = REQ_FAILFAST_MASK;
+               get_gendisk(0, NULL);
 
   ;
   return 0;
@@ -23249,45 +24472,83 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
+  rc=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ rc=1
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_REQ_FAILFAST_MASK 1" >>confdefs.h
+fi
+       rm -Rf build
 
 
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+       if test $rc -ne 0; then :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
+       else
+               if test "x$enable_linux_builtin" != xyes; then
+
+       grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
+               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
+       rc=$?
+       if test $rc -ne 0; then
+               export=0
+               for file in block/genhd.c; do
+                       grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \
+                               "$LINUX/$file" 2>/dev/null
+                       rc=$?
+                       if test $rc -eq 0; then
+                               export=1
+                               break;
+                       fi
+               done
+               if test $export -eq 0; then :
+                       rc=1
+               else :
+                       rc=0
+               fi
+       else :
+               rc=0
+       fi
+
+               fi
+               if test $rc -ne 0; then :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
-fi
-       rm -Rf build
+               else :
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
+$as_echo "#define HAVE_GET_GENDISK 1" >>confdefs.h
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether bio_end_io_t wants 1 arg" >&5
-$as_echo_n "checking whether bio_end_io_t wants 1 arg... " >&6; }
+               fi
+       fi
 
 
-cat confdefs.h - <<_ACEOF >conftest.c
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ql->discard_granularity is available" >&5
+$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
 
-               #include <linux/bio.h>
 
-               void wanted_end_io(struct bio *bio) { return; }
+cat confdefs.h - <<_ACEOF >conftest.c
 
-               bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
+
+               #include <linux/blkdev.h>
 
 int
 main (void)
 {
 
+               struct queue_limits ql __attribute__ ((unused));
+
+               ql.discard_granularity = 0;
 
   ;
   return 0;
@@ -23321,7 +24582,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_1ARG_BIO_END_IO_T 1" >>confdefs.h
+$as_echo "#define HAVE_DISCARD_GRANULARITY 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_BARRIER is defined" >&5
-$as_echo_n "checking whether BIO_RW_BARRIER is defined... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block uses const struct xattr_handler" >&5
+$as_echo_n "checking whether super_block uses const struct xattr_handler... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/bio.h>
+               #include <linux/fs.h>
+               #include <linux/xattr.h>
+
+               const struct xattr_handler xattr_test_handler = {
+                       .prefix = "test",
+                       .get    = NULL,
+                       .set    = NULL,
+               };
+
+               const struct xattr_handler *xattr_handlers[] = {
+                       &xattr_test_handler,
+               };
+
+               const struct super_block sb __attribute__ ((unused)) = {
+                       .s_xattr = xattr_handlers,
+               };
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = BIO_RW_BARRIER;
 
   ;
   return 0;
@@ -23387,7 +24661,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BIO_RW_BARRIER 1" >>confdefs.h
+$as_echo "#define HAVE_CONST_XATTR_HANDLER 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BIO_RW_DISCARD is defined" >&5
-$as_echo_n "checking whether BIO_RW_DISCARD is defined... " >&6; }
+                                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/bio.h>
+               #include <linux/xattr.h>
+
+               int get(const struct xattr_handler *handler,
+                   struct dentry *dentry, const char *name,
+                   void *buffer, size_t size) { return 0; }
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .get = get,
+               };
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = BIO_RW_DISCARD;
 
   ;
   return 0;
@@ -23453,41 +24733,36 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BIO_RW_DISCARD 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_GET_HANDLER 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_flush() is available" >&5
-$as_echo_n "checking whether blk_queue_flush() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/blkdev.h>
+                       #include <linux/xattr.h>
+
+                       int get(struct dentry *dentry, const char *name,
+                           void *buffer, size_t size, int handler_flags)
+                           { return 0; }
+                       static const struct xattr_handler
+                           xops __attribute__ ((unused)) = {
+                               .get = get,
+                       };
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_flush(q, REQ_FLUSH);
 
   ;
   return 0;
@@ -23518,44 +24793,38 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BLK_QUEUE_FLUSH 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_GET_DENTRY 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_flush() is GPL-only" >&5
-$as_echo_n "checking whether blk_queue_flush() is GPL-only... " >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/module.h>
-               #include <linux/blkdev.h>
+                               #include <linux/xattr.h>
 
-               MODULE_LICENSE("$ZFS_META_LICENSE");
+                               int get(struct inode *ip, const char *name,
+                                   void *buffer, size_t size) { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .get = get,
+                               };
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_flush(q, REQ_FLUSH);
 
   ;
   return 0;
@@ -23586,17 +24855,30 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_XATTR_GET_INODE 1" >>confdefs.h
+
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+                               as_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
 
-$as_echo "#define HAVE_BLK_QUEUE_FLUSH_GPL_ONLY 1" >>confdefs.h
 
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_hw_sectors() is available" >&5
-$as_echo_n "checking whether blk_queue_max_hw_sectors() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+                                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/blkdev.h>
+               #include <linux/xattr.h>
+
+               int set(const struct xattr_handler *handler,
+                   struct dentry *dentry, const char *name,
+                   const void *buffer, size_t size, int flags)
+                   { return 0; }
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .set = set,
+               };
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
 
   ;
   return 0;
@@ -23658,42 +24944,36 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BLK_QUEUE_MAX_HW_SECTORS 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_SET_HANDLER 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_max_segments() is available" >&5
-$as_echo_n "checking whether blk_queue_max_segments() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/blkdev.h>
+                       #include <linux/xattr.h>
+
+                       int set(struct dentry *dentry, const char *name,
+                           const void *buffer, size_t size, int flags,
+                           int handler_flags) { return 0; }
+                       static const struct xattr_handler
+                           xops __attribute__ ((unused)) = {
+                               .set = set,
+                       };
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
 
   ;
   return 0;
@@ -23724,45 +25004,39 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_BLK_QUEUE_MAX_SEGMENTS 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_SET_DENTRY 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-       EXTRA_KCFLAGS="$tmp_flags"
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether get_disk_ro() is available" >&5
-$as_echo_n "checking whether get_disk_ro() is available... " >&6; }
-       tmp_flags="$EXTRA_KCFLAGS"
-       EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/blkdev.h>
+                               #include <linux/xattr.h>
+
+                               int set(struct inode *ip, const char *name,
+                                   const void *buffer, size_t size, int flags)
+                                   { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .set = set,
+                               };
 
 int
 main (void)
 {
 
-               struct gendisk *disk = NULL;
-               (void) get_disk_ro(disk);
 
   ;
   return 0;
@@ -23793,18 +25067,17 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_GET_DISK_RO 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_SET_INODE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+                               as_fn_error $? "no; please file a bug report" "$LINENO" 5
 
 
 
        rm -Rf build
 
 
-       EXTRA_KCFLAGS="$tmp_flags"
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether get_gendisk() is available" >&5
-$as_echo_n "checking whether get_gendisk() is available... " >&6; }
+
+
+fi
+       rm -Rf build
 
 
 
+
+
+fi
+       rm -Rf build
+
+
+
+
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants simple" >&5
+$as_echo_n "checking whether xattr_handler->list() wants simple... " >&6; }
+
+
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/genhd.h>
+               #include <linux/xattr.h>
+
+               bool list(struct dentry *dentry) { return 0; }
+               static const struct xattr_handler
+                   xops __attribute__ ((unused)) = {
+                       .list = list,
+               };
 
 int
 main (void)
 {
 
-               get_gendisk(0, NULL);
 
   ;
   return 0;
@@ -23858,83 +25149,40 @@ _ACEOF
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
-  rc=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- rc=1
-
-
-fi
-       rm -Rf build
-
-
-       if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-       else
-               if test "x$enable_linux_builtin" != xyes; then
-
-       grep -q -E '[[:space:]]get_gendisk[[:space:]]' \
-               $LINUX_OBJ/$LINUX_SYMBOLS 2>/dev/null
-       rc=$?
-       if test $rc -ne 0; then
-               export=0
-               for file in block/genhd.c; do
-                       grep -q -E "EXPORT_SYMBOL.*(get_gendisk)" \
-                               "$LINUX/$file" 2>/dev/null
-                       rc=$?
-                       if test $rc -eq 0; then
-                               export=1
-                               break;
-                       fi
-               done
-               if test $export -eq 0; then :
-                       rc=1
-               else :
-                       rc=0
-               fi
-       else :
-               rc=0
-       fi
-
-               fi
-               if test $rc -ne 0; then :
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-               else :
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_GET_GENDISK 1" >>confdefs.h
-
-
-               fi
-       fi
+$as_echo "#define HAVE_XATTR_LIST_SIMPLE 1" >>confdefs.h
 
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ql->discard_granularity is available" >&5
-$as_echo_n "checking whether ql->discard_granularity is available... " >&6; }
+                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants xattr_handler" >&5
+$as_echo_n "checking whether xattr_handler->list() wants xattr_handler... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/blkdev.h>
+                       #include <linux/xattr.h>
+
+                       size_t list(const struct xattr_handler *handler,
+                           struct dentry *dentry, char *list, size_t list_size,
+                           const char *name, size_t name_len) { return 0; }
+                       static const struct xattr_handler
+                           xops __attribute__ ((unused)) = {
+                               .list = list,
+                       };
 
 int
 main (void)
 {
 
-               struct queue_limits ql __attribute__ ((unused));
-
-               ql.discard_granularity = 0;
 
   ;
   return 0;
@@ -23965,49 +25213,35 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_DISCARD_GRANULARITY 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_LIST_HANDLER 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                                                                                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether super_block uses const struct xattr_hander" >&5
-$as_echo_n "checking whether super_block uses const struct xattr_hander... " >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants dentry" >&5
+$as_echo_n "checking whether xattr_handler->list() wants dentry... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
-               #include <linux/xattr.h>
-
-               const struct xattr_handler xattr_test_handler = {
-                       .prefix = "test",
-                       .get    = NULL,
-                       .set    = NULL,
-               };
-
-               const struct xattr_handler *xattr_handlers[] = {
-                       &xattr_test_handler,
-               };
+                               #include <linux/xattr.h>
 
-               const struct super_block sb __attribute__ ((unused)) = {
-                       .s_xattr = xattr_handlers,
-               };
+                               size_t list(struct dentry *dentry,
+                                   char *list, size_t list_size,
+                                   const char *name, size_t name_len,
+                                   int handler_flags) { return 0; }
+                               static const struct xattr_handler
+                                   xops __attribute__ ((unused)) = {
+                                       .list = list,
+                               };
 
 int
 main (void)
@@ -24043,42 +25277,34 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CONST_XATTR_HANDLER 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_LIST_DENTRY 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->get() wants dentry... " >&6; }
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants inode" >&5
+$as_echo_n "checking whether xattr_handler->list() wants inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/xattr.h>
+                                       #include <linux/xattr.h>
 
-               int get(struct dentry *dentry, const char *name,
-                   void *buffer, size_t size, int handler_flags) { return 0; }
-               static const struct xattr_handler
-                   xops __attribute__ ((unused)) = {
-                       .get = get,
-               };
+                                       size_t list(struct inode *ip, char *lst,
+                                           size_t list_size, const char *name,
+                                           size_t name_len) { return 0; }
+                                       static const struct xattr_handler
+                                           xops __attribute__ ((unused)) = {
+                                               .list = list,
+                                       };
 
 int
 main (void)
@@ -24114,38 +25340,62 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_DENTRY_XATTR_GET 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_LIST_INODE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->get() wants xattr_handler" >&5
-$as_echo_n "checking whether xattr_handler->get() wants xattr_handler... " >&6; }
+                                       as_fn_error $? "no; please file a bug report" "$LINENO" 5
 
 
-cat confdefs.h - <<_ACEOF >conftest.c
+
+fi
+       rm -Rf build
 
 
-                       #include <linux/xattr.h>
 
-                       int get(const struct xattr_handler *handler, struct dentry *dentry,
-                           const char *name, void *buffer, size_t size) { return 0; }
-                       static const struct xattr_handler
-                           xops __attribute__ ((unused)) = {
-                               .get = get,
-                       };
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() exists" >&5
+$as_echo_n "checking whether inode_owner_or_capable() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/fs.h>
 
 int
 main (void)
 {
 
+               struct inode *ip = NULL;
+               (void) inode_owner_or_capable(ip);
 
   ;
   return 0;
@@ -24176,55 +25426,34 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_HANDLER_XATTR_GET 1" >>confdefs.h
+$as_echo "#define HAVE_INODE_OWNER_OR_CAPABLE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is_owner_or_cap() exists" >&5
+$as_echo_n "checking whether is_owner_or_cap() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/xattr.h>
-
-               int set(struct dentry *dentry, const char *name,
-                   const void *buffer, size_t size, int flags,
-                   int handler_flags) { return 0; }
-               static const struct xattr_handler
-                   xops __attribute__ ((unused)) = {
-                       .set = set,
-               };
+                       #include <linux/fs.h>
+                       #include <linux/sched.h>
 
 int
 main (void)
 {
 
+                       struct inode *ip = NULL;
+                       (void) is_owner_or_cap(ip);
 
   ;
   return 0;
@@ -24255,38 +25484,50 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_DENTRY_XATTR_SET 1" >>confdefs.h
+$as_echo "#define HAVE_IS_OWNER_OR_CAP 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants xattr_handler" >&5
-$as_echo_n "checking whether xattr_handler->set() wants xattr_handler... " >&6; }
+                       as_fn_error $? "no - Please file a bug report at
+                           https://github.com/zfsonlinux/zfs/issues/new" "$LINENO" 5
 
 
-cat confdefs.h - <<_ACEOF >conftest.c
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
 
 
-                       #include <linux/xattr.h>
 
-                       int set(const struct xattr_handler *handler, struct dentry *dentry,
-                           const char *name, const void *buffer, size_t size, int flags) { return 0; }
-                       static const struct xattr_handler
-                           xops __attribute__ ((unused)) = {
-                               .set = set,
-                       };
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_from_xattr() needs user_ns" >&5
+$as_echo_n "checking whether posix_acl_from_xattr() needs user_ns... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/cred.h>
+               #include <linux/fs.h>
+               #include <linux/posix_acl_xattr.h>
 
 int
 main (void)
 {
 
+               posix_acl_from_xattr(&init_user_ns, NULL, 0);
 
   ;
   return 0;
@@ -24317,17 +25558,17 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_HANDLER_XATTR_SET 1" >>confdefs.h
+$as_echo "#define HAVE_POSIX_ACL_FROM_XATTR_USERNS 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 
 
 
 
-
-fi
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->list() wants dentry... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_release() is available" >&5
+$as_echo_n "checking whether posix_acl_release() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/xattr.h>
-
-               size_t list(struct dentry *dentry, char *list, size_t list_size,
-                   const char *name, size_t name_len, int handler_flags)
-                   { return 0; }
-               static const struct xattr_handler
-                   xops __attribute__ ((unused)) = {
-                       .list = list,
-               };
+               #include <linux/cred.h>
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
 
 int
 main (void)
 {
 
+               struct posix_acl* tmp = posix_acl_alloc(1, 0);
+               posix_acl_release(tmp);
 
   ;
   return 0;
@@ -24399,7 +25629,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_DENTRY_XATTR_LIST 1" >>confdefs.h
+$as_echo "#define HAVE_POSIX_ACL_RELEASE 1" >>confdefs.h
 
 
 else
@@ -24408,26 +25638,33 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->list() wants xattr_handler" >&5
-$as_echo_n "checking whether xattr_handler->list() wants xattr_handler... " >&6; }
+
+
+
+fi
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_release() is GPL-only" >&5
+$as_echo_n "checking whether posix_acl_release() is GPL-only... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-                       #include <linux/xattr.h>
+               #include <linux/cred.h>
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
 
-                       size_t list(const struct xattr_handler *handler, struct dentry *dentry,
-                           char *list, size_t list_size, const char *name, size_t name_len) { return 0; }
-                       static const struct xattr_handler
-                           xops __attribute__ ((unused)) = {
-                               .list = list,
-                       };
+               MODULE_LICENSE("$ZFS_META_LICENSE");
 
 int
 main (void)
 {
 
+               struct posix_acl* tmp = posix_acl_alloc(1, 0);
+               posix_acl_release(tmp);
 
   ;
   return 0;
@@ -24458,24 +25695,17 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_HANDLER_XATTR_LIST 1" >>confdefs.h
-
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
+$as_echo "#define HAVE_POSIX_ACL_RELEASE_GPL_ONLY 1" >>confdefs.h
 
 
 
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode_owner_or_capable() exists" >&5
-$as_echo_n "checking whether inode_owner_or_capable() exists... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_chmod exists" >&5
+$as_echo_n "checking whether posix_acl_chmod exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
+               #include <linux/posix_acl.h>
 
 int
 main (void)
 {
 
-               struct inode *ip = NULL;
-               (void) inode_owner_or_capable(ip);
+               posix_acl_chmod(NULL, 0, 0)
 
   ;
   return 0;
@@ -24534,7 +25764,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_INODE_OWNER_OR_CAPABLE 1" >>confdefs.h
+$as_echo "#define HAVE_POSIX_ACL_CHMOD 1" >>confdefs.h
 
 
 else
@@ -24543,22 +25773,29 @@ sed 's/^/| /' conftest.$ac_ext >&5
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether is_owner_or_cap() exists" >&5
-$as_echo_n "checking whether is_owner_or_cap() exists... " >&6; }
+
+
+
+fi
+       rm -Rf build
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __posix_acl_chmod exists" >&5
+$as_echo_n "checking whether __posix_acl_chmod exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-                       #include <linux/fs.h>
-                       #include <linux/sched.h>
+               #include <linux/fs.h>
+               #include <linux/posix_acl.h>
 
 int
 main (void)
 {
 
-                       struct inode *ip = NULL;
-                       (void) is_owner_or_cap(ip);
+               __posix_acl_chmod(NULL, 0, 0)
 
   ;
   return 0;
@@ -24589,25 +25826,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_IS_OWNER_OR_CAP 1" >>confdefs.h
+$as_echo "#define HAVE___POSIX_ACL_CHMOD 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-                       as_fn_error $? "no - Please file a bug report at
-                           https://github.com/zfsonlinux/zfs/issues/new" "$LINENO" 5
-
-
-
-fi
-       rm -Rf build
-
-
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_from_xattr() needs user_ns" >&5
-$as_echo_n "checking whether posix_acl_from_xattr() needs user_ns... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode has i_acl and i_default_acl" >&5
+$as_echo_n "checking whether inode has i_acl and i_default_acl... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/cred.h>
                #include <linux/fs.h>
-               #include <linux/posix_acl_xattr.h>
 
 int
 main (void)
 {
 
-               posix_acl_from_xattr(&init_user_ns, NULL, 0);
+               struct inode ino;
+               ino.i_acl = NULL;
+               ino.i_default_acl = NULL;
 
   ;
   return 0;
@@ -24666,7 +25896,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_POSIX_ACL_FROM_XATTR_USERNS 1" >>confdefs.h
+$as_echo "#define HAVE_POSIX_ACL_CACHING 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_release() is available" >&5
-$as_echo_n "checking whether posix_acl_release() is available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_equiv_mode() wants umode_t" >&5
+$as_echo_n "checking whether posix_acl_equiv_mode() wants umode_t... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/cred.h>
                #include <linux/fs.h>
                #include <linux/posix_acl.h>
 
@@ -24699,8 +25928,8 @@ int
 main (void)
 {
 
-               struct posix_acl* tmp = posix_acl_alloc(1, 0);
-               posix_acl_release(tmp);
+               umode_t tmp;
+               posix_acl_equiv_mode(NULL,&tmp);
 
   ;
   return 0;
@@ -24734,7 +25963,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_POSIX_ACL_RELEASE 1" >>confdefs.h
+$as_echo "#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_release() is GPL-only" >&5
-$as_echo_n "checking whether posix_acl_release() is GPL-only... " >&6; }
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() exists" >&5
+$as_echo_n "checking whether iops->permission() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/cred.h>
                #include <linux/fs.h>
-               #include <linux/posix_acl.h>
 
-               MODULE_LICENSE("$ZFS_META_LICENSE");
+               int permission_fn(struct inode *inode, int mask) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .permission = permission_fn,
+               };
 
 int
 main (void)
 {
 
-               struct posix_acl* tmp = posix_acl_alloc(1, 0);
-               posix_acl_release(tmp);
 
   ;
   return 0;
@@ -24800,18 +26031,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_PERMISSION 1" >>confdefs.h
+
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_POSIX_ACL_RELEASE_GPL_ONLY 1" >>confdefs.h
-
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_chmod exists" >&5
-$as_echo_n "checking whether posix_acl_chmod exists... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() wants nameidata" >&5
+$as_echo_n "checking whether iops->permission() wants nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
-               #include <linux/posix_acl.h>
+
+               int permission_fn(struct inode *inode, int mask,
+                   struct nameidata *nd) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .permission = permission_fn,
+               };
 
 int
 main (void)
 {
 
-               posix_acl_chmod(NULL, 0, 0)
 
   ;
   return 0;
@@ -24869,7 +26106,10 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_POSIX_ACL_CHMOD 1" >>confdefs.h
+$as_echo "#define HAVE_PERMISSION 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_PERMISSION_WITH_NAMEIDATA 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __posix_acl_chmod exists" >&5
-$as_echo_n "checking whether __posix_acl_chmod exists... " >&6; }
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->check_acl() exists" >&5
+$as_echo_n "checking whether iops->check_acl() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
-               #include <linux/posix_acl.h>
+
+               int check_acl_fn(struct inode *inode, int mask) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .check_acl = check_acl_fn,
+               };
 
 int
 main (void)
 {
 
-               __posix_acl_chmod(NULL, 0, 0)
 
   ;
   return 0;
@@ -24934,7 +26180,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE___POSIX_ACL_CHMOD 1" >>confdefs.h
+$as_echo "#define HAVE_CHECK_ACL 1" >>confdefs.h
 
 
 else
@@ -24952,8 +26198,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inode has i_acl and i_default_acl" >&5
-$as_echo_n "checking whether inode has i_acl and i_default_acl... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->check_acl() wants flags" >&5
+$as_echo_n "checking whether iops->check_acl() wants flags... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -24961,13 +26207,18 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
+               int check_acl_fn(struct inode *inode, int mask,
+                   unsigned int flags) { return 0; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .check_acl = check_acl_fn,
+               };
+
 int
 main (void)
 {
 
-               struct inode ino;
-               ino.i_acl = NULL;
-               ino.i_default_acl = NULL;
 
   ;
   return 0;
@@ -25001,7 +26252,10 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_POSIX_ACL_CACHING 1" >>confdefs.h
+$as_echo "#define HAVE_CHECK_ACL 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_CHECK_ACL_WITH_FLAGS 1" >>confdefs.h
 
 
 else
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_acl_equiv_mode() wants umode_t" >&5
-$as_echo_n "checking whether posix_acl_equiv_mode() wants umode_t... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->get_acl() exists" >&5
+$as_echo_n "checking whether iops->get_acl() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
-               #include <linux/posix_acl.h>
+
+               struct posix_acl *get_acl_fn(struct inode *inode, int type)
+                   { return NULL; }
+
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .get_acl = get_acl_fn,
+               };
 
 int
 main (void)
 {
 
-               umode_t tmp;
-               posix_acl_equiv_mode(NULL,&tmp);
 
   ;
   return 0;
@@ -25068,7 +26327,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1" >>confdefs.h
+$as_echo "#define HAVE_GET_ACL 1" >>confdefs.h
 
 
 else
@@ -25086,8 +26345,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() exists" >&5
-$as_echo_n "checking whether iops->permission() exists... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current_umask exists" >&5
+$as_echo_n "checking whether current_umask exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25095,17 +26354,11 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               int permission_fn(struct inode *inode, int mask) { return 0; }
-
-               static const struct inode_operations
-                   iops __attribute__ ((unused)) = {
-                       .permission = permission_fn,
-               };
-
 int
 main (void)
 {
 
+               current_umask();
 
   ;
   return 0;
@@ -25139,7 +26392,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_PERMISSION 1" >>confdefs.h
+$as_echo "#define HAVE_CURRENT_UMASK 1" >>confdefs.h
 
 
 else
@@ -25157,8 +26410,9 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->permission() wants nameidata" >&5
-$as_echo_n "checking whether iops->permission() wants nameidata... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->show_options() wants dentry" >&5
+$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25166,12 +26420,9 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               int permission_fn(struct inode *inode, int mask,
-                   struct nameidata *nd) { return 0; }
-
-               static const struct inode_operations
-                   iops __attribute__ ((unused)) = {
-                       .permission = permission_fn,
+               int show_options (struct seq_file * x, struct dentry * y) { return 0; };
+               static struct super_operations sops __attribute__ ((unused)) = {
+                       .show_options = show_options,
                };
 
 int
@@ -25211,10 +26462,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_PERMISSION 1" >>confdefs.h
-
-
-$as_echo "#define HAVE_PERMISSION_WITH_NAMEIDATA 1" >>confdefs.h
+$as_echo "#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1" >>confdefs.h
 
 
 else
@@ -25232,8 +26480,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->check_acl() exists" >&5
-$as_echo_n "checking whether iops->check_acl() exists... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether file_inode() is available" >&5
+$as_echo_n "checking whether file_inode() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25241,17 +26489,12 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               int check_acl_fn(struct inode *inode, int mask) { return 0; }
-
-               static const struct inode_operations
-                   iops __attribute__ ((unused)) = {
-                       .check_acl = check_acl_fn,
-               };
-
 int
 main (void)
 {
 
+               struct file *f = NULL;
+               file_inode(f);
 
   ;
   return 0;
@@ -25285,7 +26528,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CHECK_ACL 1" >>confdefs.h
+$as_echo "#define HAVE_FILE_INODE 1" >>confdefs.h
 
 
 else
@@ -25303,8 +26546,9 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->check_acl() wants flags" >&5
-$as_echo_n "checking whether iops->check_acl() wants flags... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->fsync() wants" >&5
+$as_echo_n "checking whether fops->fsync() wants... " >&6; }
+
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25312,12 +26556,12 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               int check_acl_fn(struct inode *inode, int mask,
-                   unsigned int flags) { return 0; }
+               int test_fsync(struct file *f, struct dentry *dentry, int x)
+                   { return 0; }
 
-               static const struct inode_operations
-                   iops __attribute__ ((unused)) = {
-                       .check_acl = check_acl_fn,
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fsync = test_fsync,
                };
 
 int
@@ -25354,21 +26598,16 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_CHECK_ACL 1" >>confdefs.h
-
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: dentry" >&5
+$as_echo "dentry" >&6; }
 
-$as_echo "#define HAVE_CHECK_ACL_WITH_FLAGS 1" >>confdefs.h
+$as_echo "#define HAVE_FSYNC_WITH_DENTRY 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 
 
@@ -25378,8 +26617,6 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->get_acl() exists" >&5
-$as_echo_n "checking whether iops->get_acl() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25387,12 +26624,11 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               struct posix_acl *get_acl_fn(struct inode *inode, int type)
-                   { return NULL; }
+               int test_fsync(struct file *f, int x) { return 0; }
 
-               static const struct inode_operations
-                   iops __attribute__ ((unused)) = {
-                       .get_acl = get_acl_fn,
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fsync = test_fsync,
                };
 
 int
@@ -25429,18 +26665,16 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no dentry" >&5
+$as_echo "no dentry" >&6; }
 
-$as_echo "#define HAVE_GET_ACL 1" >>confdefs.h
+$as_echo "#define HAVE_FSYNC_WITHOUT_DENTRY 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 
 
@@ -25450,8 +26684,6 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current_umask exists" >&5
-$as_echo_n "checking whether current_umask exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25459,11 +26691,18 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
+               int test_fsync(struct file *f, loff_t a, loff_t b, int c)
+                   { return 0; }
+
+               static const struct file_operations
+                   fops __attribute__ ((unused)) = {
+                       .fsync = test_fsync,
+               };
+
 int
 main (void)
 {
 
-               current_umask();
 
   ;
   return 0;
@@ -25494,18 +26733,16 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: range" >&5
+$as_echo "range" >&6; }
 
-$as_echo "#define HAVE_CURRENT_UMASK 1" >>confdefs.h
+$as_echo "#define HAVE_FSYNC_RANGE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
 
 
 
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->show_options() wants dentry" >&5
-$as_echo_n "checking whether sops->show_options() wants dentry... " >&6; }
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->evict_inode() exists" >&5
+$as_echo_n "checking whether sops->evict_inode() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
-
-               int show_options (struct seq_file * x, struct dentry * y) { return 0; };
+               void evict_inode (struct inode * t) { return; }
                static struct super_operations sops __attribute__ ((unused)) = {
-                       .show_options = show_options,
+                       .evict_inode = evict_inode,
                };
 
 int
@@ -25567,7 +26803,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_SHOW_OPTIONS_WITH_DENTRY 1" >>confdefs.h
+$as_echo "#define HAVE_EVICT_INODE 1" >>confdefs.h
 
 
 else
@@ -25585,8 +26821,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether file_inode() is available" >&5
-$as_echo_n "checking whether file_inode() is available... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->dirty_inode() wants flags" >&5
+$as_echo_n "checking whether sops->dirty_inode() wants flags... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25594,12 +26830,17 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
+               void dirty_inode(struct inode *a, int b) { return; }
+
+               static const struct super_operations
+                   sops __attribute__ ((unused)) = {
+                       .dirty_inode = dirty_inode,
+               };
+
 int
 main (void)
 {
 
-               struct file *f = NULL;
-               file_inode(f);
 
   ;
   return 0;
@@ -25633,7 +26874,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_FILE_INODE 1" >>confdefs.h
+$as_echo "#define HAVE_DIRTY_INODE_WITH_FLAGS 1" >>confdefs.h
 
 
 else
@@ -25651,9 +26892,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->fsync() wants" >&5
-$as_echo_n "checking whether fops->fsync() wants... " >&6; }
-
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->nr_cached_objects() exists" >&5
+$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25661,12 +26901,11 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               int test_fsync(struct file *f, struct dentry *dentry, int x)
-                   { return 0; }
+               int nr_cached_objects(struct super_block *sb) { return 0; }
 
-               static const struct file_operations
-                   fops __attribute__ ((unused)) = {
-                       .fsync = test_fsync,
+               static const struct super_operations
+                   sops __attribute__ ((unused)) = {
+                       .nr_cached_objects = nr_cached_objects,
                };
 
 int
@@ -25703,16 +26942,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: dentry" >&5
-$as_echo "dentry" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_FSYNC_WITH_DENTRY 1" >>confdefs.h
+$as_echo "#define HAVE_NR_CACHED_OBJECTS 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
@@ -25722,6 +26963,8 @@ fi
 
 
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->free_cached_objects() exists" >&5
+$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25729,11 +26972,12 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               int test_fsync(struct file *f, int x) { return 0; }
+               void free_cached_objects(struct super_block *sb, int x)
+                   { return; }
 
-               static const struct file_operations
-                   fops __attribute__ ((unused)) = {
-                       .fsync = test_fsync,
+               static const struct super_operations
+                   sops __attribute__ ((unused)) = {
+                       .free_cached_objects = free_cached_objects,
                };
 
 int
@@ -25770,16 +27014,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no dentry" >&5
-$as_echo "no dentry" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_FSYNC_WITHOUT_DENTRY 1" >>confdefs.h
+$as_echo "#define HAVE_FREE_CACHED_OBJECTS 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
 
 
 
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->fallocate() exists" >&5
+$as_echo_n "checking whether fops->fallocate() exists... " >&6; }
+
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
 
-               int test_fsync(struct file *f, loff_t a, loff_t b, int c)
-                   { return 0; }
+               long test_fallocate(struct file *file, int mode,
+                   loff_t offset, loff_t len) { return 0; }
 
                static const struct file_operations
                    fops __attribute__ ((unused)) = {
-                       .fsync = test_fsync,
+                       .fallocate = test_fallocate,
                };
 
 int
@@ -25838,16 +27087,18 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: range" >&5
-$as_echo "range" >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_FSYNC_RANGE 1" >>confdefs.h
+$as_echo "#define HAVE_FILE_FALLOCATE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 
 
 
 
 
 
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->evict_inode() exists" >&5
-$as_echo_n "checking whether sops->evict_inode() exists... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->fallocate() exists" >&5
+$as_echo_n "checking whether iops->fallocate() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
-               void evict_inode (struct inode * t) { return; }
-               static struct super_operations sops __attribute__ ((unused)) = {
-                       .evict_inode = evict_inode,
+
+               long test_fallocate(struct inode *inode, int mode,
+                   loff_t offset, loff_t len) { return 0; }
+
+               static const struct inode_operations
+                   fops __attribute__ ((unused)) = {
+                       .fallocate = test_fallocate,
                };
 
 int
@@ -25908,7 +27162,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_EVICT_INODE 1" >>confdefs.h
+$as_echo "#define HAVE_INODE_FALLOCATE 1" >>confdefs.h
 
 
 else
@@ -25926,8 +27180,9 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->dirty_inode() wants flags" >&5
-$as_echo_n "checking whether sops->dirty_inode() wants flags... " >&6; }
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5
+$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25935,11 +27190,12 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               void dirty_inode(struct inode *a, int b) { return; }
+               int mkdir(struct inode *inode, struct dentry *dentry,
+                   umode_t umode) { return 0; }
 
-               static const struct super_operations
-                   sops __attribute__ ((unused)) = {
-                       .dirty_inode = dirty_inode,
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .mkdir = mkdir,
                };
 
 int
@@ -25979,7 +27235,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_DIRTY_INODE_WITH_FLAGS 1" >>confdefs.h
+$as_echo "#define HAVE_MKDIR_UMODE_T 1" >>confdefs.h
 
 
 else
@@ -25997,8 +27253,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->nr_cached_objects() exists" >&5
-$as_echo_n "checking whether sops->nr_cached_objects() exists... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->lookup() passes nameidata" >&5
+$as_echo_n "checking whether iops->lookup() passes nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -26006,11 +27262,13 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               int nr_cached_objects(struct super_block *sb) { return 0; }
+               struct dentry *inode_lookup(struct inode *inode,
+                   struct dentry *dentry, struct nameidata *nidata)
+                   { return NULL; }
 
-               static const struct super_operations
-                   sops __attribute__ ((unused)) = {
-                       .nr_cached_objects = nr_cached_objects,
+               static const struct inode_operations iops
+                   __attribute__ ((unused)) = {
+                       .lookup = inode_lookup,
                };
 
 int
@@ -26050,7 +27308,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_NR_CACHED_OBJECTS 1" >>confdefs.h
+$as_echo "#define HAVE_LOOKUP_NAMEIDATA 1" >>confdefs.h
 
 
 else
@@ -26068,8 +27326,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sops->free_cached_objects() exists" >&5
-$as_echo_n "checking whether sops->free_cached_objects() exists... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->create() passes nameidata" >&5
+$as_echo_n "checking whether iops->create() passes nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -26077,12 +27335,17 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                #include <linux/fs.h>
 
-               void free_cached_objects(struct super_block *sb, int x)
-                   { return; }
+               #ifdef HAVE_MKDIR_UMODE_T
+               int inode_create(struct inode *inode ,struct dentry *dentry,
+                   umode_t umode, struct nameidata *nidata) { return 0; }
+               #else
+               int inode_create(struct inode *inode,struct dentry *dentry,
+                   int umode, struct nameidata * nidata) { return 0; }
+               #endif
 
-               static const struct super_operations
-                   sops __attribute__ ((unused)) = {
-                       .free_cached_objects = free_cached_objects,
+               static const struct inode_operations
+                   iops __attribute__ ((unused)) = {
+                       .create         = inode_create,
                };
 
 int
@@ -26122,7 +27385,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_FREE_CACHED_OBJECTS 1" >>confdefs.h
+$as_echo "#define HAVE_CREATE_NAMEIDATA 1" >>confdefs.h
 
 
 else
 
 
 
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fops->fallocate() exists" >&5
-$as_echo_n "checking whether fops->fallocate() exists... " >&6; }
+                                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->get_link() passes delayed" >&5
+$as_echo_n "checking whether iops->get_link() passes delayed... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
-
-               long test_fallocate(struct file *file, int mode,
-                   loff_t offset, loff_t len) { return 0; }
-
-               static const struct file_operations
-                   fops __attribute__ ((unused)) = {
-                       .fallocate = test_fallocate,
+               const char *get_link(struct dentry *de, struct inode *ip,
+                   struct delayed_call *done) { return "symlink"; }
+               static struct inode_operations
+                    iops __attribute__ ((unused)) = {
+                       .get_link = get_link,
                };
 
 int
@@ -26195,40 +27455,29 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_FILE_FALLOCATE 1" >>confdefs.h
+$as_echo "#define HAVE_GET_LINK_DELAYED 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->fallocate() exists" >&5
-$as_echo_n "checking whether iops->fallocate() exists... " >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->get_link() passes cookie" >&5
+$as_echo_n "checking whether iops->get_link() passes cookie... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
-
-               long test_fallocate(struct inode *inode, int mode,
-                   loff_t offset, loff_t len) { return 0; }
-
-               static const struct inode_operations
-                   fops __attribute__ ((unused)) = {
-                       .fallocate = test_fallocate,
-               };
+                       #include <linux/fs.h>
+                       const char *get_link(struct dentry *de, struct
+                           inode *ip, void **cookie) { return "symlink"; }
+                       static struct inode_operations
+                            iops __attribute__ ((unused)) = {
+                               .get_link = get_link,
+                       };
 
 int
 main (void)
@@ -26264,43 +27513,32 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_INODE_FALLOCATE 1" >>confdefs.h
+$as_echo "#define HAVE_GET_LINK_COOKIE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
-
-
-fi
-       rm -Rf build
-
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->create()/mkdir()/mknod() take umode_t" >&5
-$as_echo_n "checking whether iops->create()/mkdir()/mknod() take umode_t... " >&6; }
+                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->follow_link() passes cookie" >&5
+$as_echo_n "checking whether iops->follow_link() passes cookie... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
-
-               int mkdir(struct inode *inode, struct dentry *dentry,
-                   umode_t umode) { return 0; }
-
-               static const struct inode_operations
+               const char *follow_link(struct dentry *de,
+                   void **cookie) { return "symlink"; }
+               static struct inode_operations
                    iops __attribute__ ((unused)) = {
-                       .mkdir = mkdir,
+                       .follow_link = follow_link,
                };
 
 int
@@ -26340,41 +27578,29 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_MKDIR_UMODE_T 1" >>confdefs.h
+$as_echo "#define HAVE_FOLLOW_LINK_COOKIE 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->lookup() passes nameidata" >&5
-$as_echo_n "checking whether iops->lookup() passes nameidata... " >&6; }
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->follow_link() passes nameidata" >&5
+$as_echo_n "checking whether iops->follow_link() passes nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
                #include <linux/fs.h>
-
-               struct dentry *inode_lookup(struct inode *inode,
-                   struct dentry *dentry, struct nameidata *nidata)
-                   { return NULL; }
-
-               static const struct inode_operations iops
-                   __attribute__ ((unused)) = {
-                       .lookup = inode_lookup,
-               };
+                       void *follow_link(struct dentry *de, struct
+                           nameidata *nd) { return (void *)NULL; }
+                       static struct inode_operations
+                           iops __attribute__ ((unused)) = {
+                               .follow_link = follow_link,
+                       };
 
 int
 main (void)
@@ -26410,18 +27636,17 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_LOOKUP_NAMEIDATA 1" >>confdefs.h
+$as_echo "#define HAVE_FOLLOW_LINK_NAMEIDATA 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+                        as_fn_error $? "no; please file a bug report" "$LINENO" 5
 
 
 
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->create() passes nameidata" >&5
-$as_echo_n "checking whether iops->create() passes nameidata... " >&6; }
 
+fi
+       rm -Rf build
 
-cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
 
-               #ifdef HAVE_MKDIR_UMODE_T
-               int inode_create(struct inode *inode ,struct dentry *dentry,
-                   umode_t umode, struct nameidata *nidata) { return 0; }
-               #else
-               int inode_create(struct inode *inode,struct dentry *dentry,
-                   int umode, struct nameidata * nidata) { return 0; }
-               #endif
 
-               static const struct inode_operations
-                   iops __attribute__ ((unused)) = {
-                       .create         = inode_create,
-               };
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #if !defined(HAVE_GET_LINK_DELAYED)
+               #error "Expecting get_link() delayed done"
+               #endif
 
 int
 main (void)
@@ -26487,40 +27721,28 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CREATE_NAMEIDATA 1" >>confdefs.h
+$as_echo "#define HAVE_PUT_LINK_DELAYED 1" >>confdefs.h
 
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->follow_link() passes nameidata" >&5
-$as_echo_n "checking whether iops->follow_link() passes nameidata... " >&6; }
+                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->put_link() passes cookie" >&5
+$as_echo_n "checking whether iops->put_link() passes cookie... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
-               const char *follow_link(struct dentry *de, void **cookie)
-                   { return "symlink"; }
-               static struct inode_operations iops __attribute__ ((unused)) = {
-                       .follow_link = follow_link,
-               };
+                       #include <linux/fs.h>
+                       void put_link(struct inode *ip, void *cookie)
+                           { return; }
+                       static struct inode_operations
+                           iops __attribute__ ((unused)) = {
+                               .put_link = put_link,
+                       };
 
 int
 main (void)
@@ -26556,39 +27778,32 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_FOLLOW_LINK_NAMEIDATA 1" >>confdefs.h
-
-
-
-
-fi
-       rm -Rf build
-
+$as_echo "#define HAVE_PUT_LINK_COOKIE 1" >>confdefs.h
 
 
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->put_link() passes nameidata" >&5
+                                                                                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iops->put_link() passes nameidata" >&5
 $as_echo_n "checking whether iops->put_link() passes nameidata... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/fs.h>
-               void put_link(struct inode *ip, void *cookie) { return; }
-               static struct inode_operations iops __attribute__ ((unused)) = {
-                       .put_link = put_link,
-               };
+                               #include <linux/fs.h>
+                               void put_link(struct dentry *de, struct
+                                   nameidata *nd, void *ptr) { return; }
+                               static struct inode_operations
+                                   iops __attribute__ ((unused)) = {
+                                       .put_link = put_link,
+                               };
 
 int
 main (void)
@@ -26624,17 +27839,30 @@ _ACEOF
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; }; then :
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+                               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define HAVE_PUT_LINK_NAMEIDATA 1" >>confdefs.h
+
 
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-               { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
+                               as_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
 
-$as_echo "#define HAVE_PUT_LINK_NAMEIDATA 1" >>confdefs.h
 
 
 
@@ -31098,7 +32326,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by zfs $as_me 0.6.5.4, which was
+This file was extended by zfs $as_me 0.6.5.5, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -31164,7 +32392,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-zfs config.status 0.6.5.4
+zfs config.status 0.6.5.5
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
index 9d03875d3810e9c4dfa96d2f57a931f426d2ee78..7826ca29105707fb1735d1ae840eec6b7309bd30 100644 (file)
@@ -75,11 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 0be04d8410d3f14e34793217b3357dac45de0355..1c97d6c6ff470250708102c5aec5e19a853c51cb 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 40ea8d35bd70330e8b81c4493c3a68d6a81d2094..64cab1a779674de2f0ffa707f5b0afd03ccf7ca4 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index b1ef4b4cde111a4ba55ef40bf31a5dd7eabb5be7..a1464f89f400f3b24e89373fa1db001f5518b0d3 100644 (file)
@@ -75,11 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index baf624b85aaee248b5db88816b36e27bdae9bf90..cfe9bc4c436a0aca3a97a845eb0a4837ebdecca9 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index abab775ac39af379b572bb9c72cac1cad4a16991..327d705b7ff2b09c05a9720aa2ee25eb400722fb 100644 (file)
@@ -75,11 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index da9c71725bdb2760e7ee20bafc58d9bdadd3fa5d..d3624b78b307343380463f5cce129a392749334a 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index d70416f27ad5adf513d27a1000b68389ee8caa06..a196c03505f2410a716e05a5fe82305b035130cb 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 862853c934fcbd4e9e28de9eb70c096eb88468a9..c1d7c06d9145d78222b6d867f1c6e1e0a8a8eae1 100644 (file)
@@ -75,11 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index ef704dccdae0c123124bf2446c611d031b90d65b..562cfe055eccc36071b5ebac59880835f560604f 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index d58773269e40da4b28fc390e05e04181de3dae4b..eb321986b56e0b664e090bd3e384070302671ea7 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 95a678b807f5c11027684999983a694621ced1c4..c7e241ec17da02981e52677d404fb66e5213ea38 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 25d070014a72d6068148e58cd170de4d9411ce8b..6c24b47885e6a15ee438deb5bbce579e74d87375 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 28eff95fae99d3e764cdee2e47639d8fd73b207a..eee6c1f94a9a3b8d012458e9490e9a6ccb6dd697 100644 (file)
@@ -41,26 +41,73 @@ typedef const struct xattr_handler  xattr_handler_t;
 typedef struct xattr_handler           xattr_handler_t;
 #endif
 
+/*
+ * 3.7 API change,
+ * Preferred XATTR_NAME_* definitions introduced, these are mapped to
+ * the previous definitions for older kernels.
+ */
+#ifndef XATTR_NAME_POSIX_ACL_DEFAULT
+#define        XATTR_NAME_POSIX_ACL_DEFAULT    POSIX_ACL_XATTR_DEFAULT
+#endif
+
+#ifndef XATTR_NAME_POSIX_ACL_ACCESS
+#define        XATTR_NAME_POSIX_ACL_ACCESS     POSIX_ACL_XATTR_ACCESS
+#endif
+
+/*
+ * 4.5 API change,
+ */
+#if defined(HAVE_XATTR_LIST_SIMPLE)
+#define        ZPL_XATTR_LIST_WRAPPER(fn)                                      \
+static bool                                                            \
+fn(struct dentry *dentry)                                              \
+{                                                                      \
+       return (!!__ ## fn(dentry->d_inode, NULL, 0, NULL, 0));         \
+}
+/*
+ * 4.4 API change,
+ */
+#elif defined(HAVE_XATTR_LIST_DENTRY)
+#define        ZPL_XATTR_LIST_WRAPPER(fn)                                      \
+static size_t                                                          \
+fn(struct dentry *dentry, char *list, size_t list_size,                        \
+    const char *name, size_t name_len, int type)                       \
+{                                                                      \
+       return (__ ## fn(dentry->d_inode,                               \
+           list, list_size, name, name_len));                          \
+}
 /*
  * 2.6.33 API change,
- * The xattr_hander->get() callback was changed to take a dentry
- * instead of an inode, and a handler_flags argument was added.
  */
-#ifdef HAVE_DENTRY_XATTR_GET
-#define        ZPL_XATTR_GET_WRAPPER(fn)                                       \
-static int                                                             \
-fn(struct dentry *dentry, const char *name, void *buffer, size_t size, \
-    int unused_handler_flags)                                          \
+#elif defined(HAVE_XATTR_LIST_HANDLER)
+#define        ZPL_XATTR_LIST_WRAPPER(fn)                                      \
+static size_t                                                          \
+fn(const struct xattr_handler *handler, struct dentry *dentry,         \
+    char *list, size_t list_size, const char *name, size_t name_len)   \
 {                                                                      \
-       return (__ ## fn(dentry->d_inode, name, buffer, size));         \
+       return (__ ## fn(dentry->d_inode,                               \
+           list, list_size, name, name_len));                          \
+}
+/*
+ * 2.6.32 API
+ */
+#elif defined(HAVE_XATTR_LIST_INODE)
+#define        ZPL_XATTR_LIST_WRAPPER(fn)                                      \
+static size_t                                                          \
+fn(struct inode *ip, char *list, size_t list_size,                     \
+    const char *name, size_t name_len)                                 \
+{                                                                      \
+       return (__ ## fn(ip, list, list_size, name, name_len));         \
 }
+#endif
+
 /*
  * 4.4 API change,
- * The xattr_hander->get() callback was changed to take a xattr_handler,
+ * The xattr_handler->get() callback was changed to take a xattr_handler,
  * and handler_flags argument was removed and should be accessed by
  * handler->flags.
  */
-#elif defined(HAVE_HANDLER_XATTR_GET)
+#if defined(HAVE_XATTR_GET_HANDLER)
 #define        ZPL_XATTR_GET_WRAPPER(fn)                                       \
 static int                                                             \
 fn(const struct xattr_handler *handler, struct dentry *dentry,         \
@@ -68,35 +115,38 @@ fn(const struct xattr_handler *handler, struct dentry *dentry,             \
 {                                                                      \
        return (__ ## fn(dentry->d_inode, name, buffer, size));         \
 }
-#else
+/*
+ * 2.6.33 API change,
+ * The xattr_handler->get() callback was changed to take a dentry
+ * instead of an inode, and a handler_flags argument was added.
+ */
+#elif defined(HAVE_XATTR_GET_DENTRY)
 #define        ZPL_XATTR_GET_WRAPPER(fn)                                       \
 static int                                                             \
-fn(struct inode *ip, const char *name, void *buffer, size_t size)      \
+fn(struct dentry *dentry, const char *name, void *buffer, size_t size, \
+    int unused_handler_flags)                                          \
 {                                                                      \
-       return (__ ## fn(ip, name, buffer, size));                      \
+       return (__ ## fn(dentry->d_inode, name, buffer, size));         \
 }
-#endif /* HAVE_DENTRY_XATTR_GET */
-
 /*
- * 2.6.33 API change,
- * The xattr_hander->set() callback was changed to take a dentry
- * instead of an inode, and a handler_flags argument was added.
+ * 2.6.32 API
  */
-#ifdef HAVE_DENTRY_XATTR_SET
-#define        ZPL_XATTR_SET_WRAPPER(fn)                                       \
+#elif defined(HAVE_XATTR_GET_INODE)
+#define        ZPL_XATTR_GET_WRAPPER(fn)                                       \
 static int                                                             \
-fn(struct dentry *dentry, const char *name, const void *buffer,                \
-    size_t size, int flags, int unused_handler_flags)                  \
+fn(struct inode *ip, const char *name, void *buffer, size_t size)      \
 {                                                                      \
-       return (__ ## fn(dentry->d_inode, name, buffer, size, flags));  \
+       return (__ ## fn(ip, name, buffer, size));                      \
 }
+#endif
+
 /*
  * 4.4 API change,
- * The xattr_hander->set() callback was changed to take a xattr_handler,
+ * The xattr_handler->set() callback was changed to take a xattr_handler,
  * and handler_flags argument was removed and should be accessed by
  * handler->flags.
  */
-#elif defined(HAVE_HANDLER_XATTR_SET)
+#if defined(HAVE_XATTR_SET_HANDLER)
 #define        ZPL_XATTR_SET_WRAPPER(fn)                                       \
 static int                                                             \
 fn(const struct xattr_handler *handler, struct dentry *dentry,         \
@@ -104,7 +154,23 @@ fn(const struct xattr_handler *handler, struct dentry *dentry,             \
 {                                                                      \
        return (__ ## fn(dentry->d_inode, name, buffer, size, flags));  \
 }
-#else
+/*
+ * 2.6.33 API change,
+ * The xattr_handler->set() callback was changed to take a dentry
+ * instead of an inode, and a handler_flags argument was added.
+ */
+#elif defined(HAVE_XATTR_SET_DENTRY)
+#define        ZPL_XATTR_SET_WRAPPER(fn)                                       \
+static int                                                             \
+fn(struct dentry *dentry, const char *name, const void *buffer,                \
+    size_t size, int flags, int unused_handler_flags)                  \
+{                                                                      \
+       return (__ ## fn(dentry->d_inode, name, buffer, size, flags));  \
+}
+/*
+ * 2.6.32 API
+ */
+#elif defined(HAVE_XATTR_SET_INODE)
 #define        ZPL_XATTR_SET_WRAPPER(fn)                                       \
 static int                                                             \
 fn(struct inode *ip, const char *name, const void *buffer,             \
@@ -112,7 +178,7 @@ fn(struct inode *ip, const char *name, const void *buffer,          \
 {                                                                      \
        return (__ ## fn(ip, name, buffer, size, flags));               \
 }
-#endif /* HAVE_DENTRY_XATTR_SET */
+#endif
 
 #ifdef HAVE_6ARGS_SECURITY_INODE_INIT_SECURITY
 #define        zpl_security_inode_init_security(ip, dip, qstr, nm, val, len)   \
index 4cbb4db5034bb3e21d9f5abe88ea99f0ab09e617..d997dc4cf15877972aeb7fcc6aad7ec0855b3754 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 647649418bacbbb5524081091d3490a1354a342e..1f556484deb00952931ead9c3ed5f0281ec99068 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index a56e485f21907d1052317fbb215b40f9cb04a74b..22352550af4df8896a6ad31dd86179c5a438f577 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index db85e80c82844ca152bcc418273b785f67d38212..a96c569130833a96fcd7d491f095fbb753d86fa7 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 48e3bcd7cdf373e4547a5441aff10278b9569aa5..01d24662a0e01bf67bc21652bab7d14b2dfbd280 100644 (file)
@@ -82,6 +82,10 @@ typedef struct sa_bulk_attr {
        uint16_t                sa_size;
 } sa_bulk_attr_t;
 
+/*
+ * The on-disk format of sa_hdr_phys_t limits SA lengths to 16-bit values.
+ */
+#define        SA_ATTR_MAX_LEN UINT16_MAX
 
 /*
  * special macro for adding entries for bulk attr support
@@ -95,6 +99,7 @@ typedef struct sa_bulk_attr {
 
 #define        SA_ADD_BULK_ATTR(b, idx, attr, func, data, len) \
 { \
+       ASSERT3U(len, <=, SA_ATTR_MAX_LEN); \
        b[idx].sa_attr = attr;\
        b[idx].sa_data_func = func; \
        b[idx].sa_data = data; \
index 28407c6f76fe1c725b3a56aff10e6d7bccaa0129..efaefdaccbc11bdf420da417deac59db1bcd3ee3 100644 (file)
@@ -112,8 +112,9 @@ typedef struct zfs_sb {
        uint64_t        z_groupquota_obj;
        uint64_t        z_replay_eof;   /* New end of file - replay only */
        sa_attr_type_t  *z_attr_table;  /* SA attr mapping->id */
-#define        ZFS_OBJ_MTX_SZ  256
-       kmutex_t        *z_hold_mtx;    /* znode hold locks */
+       uint64_t        z_hold_size;    /* znode hold array size */
+       avl_tree_t      *z_hold_trees;  /* znode hold trees */
+       kmutex_t        *z_hold_locks;  /* znode hold locks */
 } zfs_sb_t;
 
 #define        ZFS_SUPER_MAGIC 0x2fc12fc1
index 7e73cf99182e50ea936c9f340324e270ea350233..c03bef5c7d6453e32f95e4f9560f82a728254e8c 100644 (file)
@@ -220,6 +220,12 @@ typedef struct znode {
        struct inode    z_inode;        /* generic vfs inode */
 } znode_t;
 
+typedef struct znode_hold {
+       uint64_t        zh_obj;         /* object id */
+       kmutex_t        zh_lock;        /* lock serializing object access */
+       avl_node_t      zh_node;        /* avl tree linkage */
+       refcount_t      zh_refcount;    /* active consumer reference count */
+} znode_hold_t;
 
 /*
  * Range locking rules
@@ -273,17 +279,11 @@ typedef struct znode {
 /*
  * Macros for dealing with dmu_buf_hold
  */
-#define        ZFS_OBJ_HASH(obj_num)   ((obj_num) & (ZFS_OBJ_MTX_SZ - 1))
-#define        ZFS_OBJ_MUTEX(zsb, obj_num)     \
-       (&(zsb)->z_hold_mtx[ZFS_OBJ_HASH(obj_num)])
-#define        ZFS_OBJ_HOLD_ENTER(zsb, obj_num) \
-       mutex_enter(ZFS_OBJ_MUTEX((zsb), (obj_num)))
-#define        ZFS_OBJ_HOLD_TRYENTER(zsb, obj_num) \
-       mutex_tryenter(ZFS_OBJ_MUTEX((zsb), (obj_num)))
-#define        ZFS_OBJ_HOLD_EXIT(zsb, obj_num) \
-       mutex_exit(ZFS_OBJ_MUTEX((zsb), (obj_num)))
-#define        ZFS_OBJ_HOLD_OWNED(zsb, obj_num) \
-       mutex_owned(ZFS_OBJ_MUTEX((zsb), (obj_num)))
+#define        ZFS_OBJ_MTX_SZ          64
+#define        ZFS_OBJ_MTX_MAX         (1024 * 1024)
+#define        ZFS_OBJ_HASH(zsb, obj)  ((obj) & ((zsb->z_hold_size) - 1))
+
+extern unsigned int zfs_object_mutex_size;
 
 /* Encode ZFS stored time values from a struct timespec */
 #define        ZFS_TIME_ENCODE(tp, stmp)               \
@@ -320,6 +320,7 @@ extern void zfs_grow_blocksize(znode_t *, uint64_t, dmu_tx_t *);
 extern int     zfs_freesp(znode_t *, uint64_t, uint64_t, int, boolean_t);
 extern void    zfs_znode_init(void);
 extern void    zfs_znode_fini(void);
+extern int     zfs_znode_hold_compare(const void *, const void *);
 extern int     zfs_zget(zfs_sb_t *, uint64_t, znode_t **);
 extern int     zfs_rezget(znode_t *);
 extern void    zfs_zinactive(znode_t *);
index 4a88e785fc6ad22095ce3bf0d3bc8d72fe2e5d2b..d29ccfbd0b2dd1961f0ae8e7ddff026e5d04dfed 100644 (file)
@@ -75,11 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 27b7fb5313cc35b0cbf885ec8ce4029d6a31763b..e018aa2271908b326bbd09dd24d6d15a1f7ba6e9 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 40c4e7c075d2730eb38cd16fede58914357e4a25..9987c3753ddeaf0b7e8293766c3b86e8ad82af50 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index faa754c385e9b433e29d3cbd598c1a08a9031170..639424322b3fb63d894a8ea02eb022652c1eb532 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index a6e58ca0a15a01e1027609da4c2e19536e897158..17d2a50e4ba812aa12029c7febf4707131e7f4d8 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 47c2d2668645c672bb990baa4ad9b24687ca8c24..a141ed7772cb58edafaa8c868f8aa827806a49bb 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 2747cafdd5090b0b2726415f2d4421cd568265c9..677332ab949f65c1192c3fade9f353b0d134042b 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index f40364a84da148107a30e4315d75dda033d0f212..69edd0af0e6a9f83fef116664fde58f443114cad 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 6dca1f1314d816592496781f066cfec3cde4b5f4..972d265896900f181d1812a309f3476069855566 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 5b6f9d6961d9b8e8982346def8e35c7aa1826f8a..102317d433022de2216afcd3ebc13af36a1bca02 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 33a1f8ea561ec682184c509e434d83a20e0df738..1305ba7722b34f055c04e94b46d3eeaea982b650 100644 (file)
@@ -75,11 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index a0b78fe1762c8566b9e335d0ee5992d43555f8e1..dfbde3077ce5580aa64a0727157356acc3f64a5f 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index e4f52fbff1fbd9a84340a4e9ca5e93701461c0bf..0b087cecdaea4494f980370a1b785c2467a8c693 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 9c397ba7f1f4c0b19debdbc31740e8e9455857be..e226197e6de5fac135b41f0a68922511f61da354 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 7d886ef6b2f8a091ead4e8a792a519f69131ef75..425d4ea11e4e7a6134683783da1e78b9291c58c1 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 386a7cc2a5ec657db2346489621c286dd4bd468f..be96252cc87595f47438b5707baa2fc5ed27f340 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index bd34dec321085ab38a75c68da60a864272f7b03a..9816345a89ebf18248707620b0bc9c0e78c772df 100644 (file)
@@ -53,7 +53,6 @@ typedef u_longlong_t  u_offset_t;
 typedef u_longlong_t   len_t;
 typedef longlong_t     diskaddr_t;
 
-typedef ulong_t                pfn_t;          /* page frame number */
 typedef ulong_t                pgcnt_t;        /* number of pages */
 typedef long           spgcnt_t;       /* signed number of pages */
 
index 5ff6dfcf1322f2f33be2c93827c5359202e47ed5..3bc8f047781a42add2e2f4676de9de2c26dbdf7b 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 48c10e385d48cf06b44d85fff8fadd2612decf8a..afebe96c94b47d0412441b118f029789c9f5f359 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 7d77450ce4490825ca0f575da3f36e6a201aa46f..6ef1a43a190c189f370873cb36f50f07d26d8264 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index fe7567afdedf09dc683f7551d9eac1f8eeeee142..d9a989ebfc16dd7cd360e07f2011c041622ebb03 100644 (file)
@@ -79,11 +79,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -96,7 +96,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index dd30772281264c7f307f0ecfca749cec6ae3c289..ee1c6c6ed9080d675287481f8f634e69f6f55f85 100644 (file)
@@ -5,7 +5,7 @@ includedir=${prefix}/include
 
 Name: libzfs
 Description: LibZFS library
-Version: 0.6.5.4
+Version: 0.6.5.5
 URL: http://zfsonlinux.org
 Requires: libzfs_core
 Cflags: -I${includedir}/libzfs -I${includedir}/libspl
index 88f9834685cace22b2ac822ccdeb84f665c4485c..04fea8e59c1b2333a54e9900281bc40227aab7e6 100644 (file)
@@ -5,7 +5,7 @@ includedir=${prefix}/include
 
 Name: libzfs_core
 Description: LibZFS core library
-Version: 0.6.5.4
+Version: 0.6.5.5
 URL: http://zfsonlinux.org
 Cflags: -I${includedir}/libzfs -I${includedir}/libspl
 Libs: -L${libdir} -lzfs_core
index 8d1a210947a2c862db95cb8f9b19784fed17c531..bd2fd294706d661e721207f357a98a8a9b07dd8d 100644 (file)
@@ -2003,7 +2003,7 @@ created_before(libzfs_handle_t *hdl, avl_tree_t *avl,
     uint64_t guid1, uint64_t guid2)
 {
        nvlist_t *nvfs;
-       char *fsname, *snapname;
+       char *fsname = NULL, *snapname = NULL;
        char buf[ZFS_MAXNAMELEN];
        int rv;
        zfs_handle_t *guid1hdl, *guid2hdl;
index 5ce59deadab4900446d8a43b139f909ea28f9946..5f1a2f98877b330af641402b0e2a157562573924 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index a30cc17ef1ad935c347287ba017be1ca0f8838eb..4f58907bf0638fce02d4398a9380b7ddc9f0b8a3 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index e23f257bb9a63883579cd25c801ba00d01723466..3ebd799434c78f40f24499a970a8e3f544cf8819 100644 (file)
@@ -75,11 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 5cf7ce952d7762b77869a6417287e44d3cf4fee2..8e87b29fca04357d2856a588ed82b4115c39e551 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 3de8f7b2b6ee0708efc198745f4301ef2a17d017..078599bd6419e21465a9ca109a9838f9547b9c83 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 176e7aa7667244788d3f1fe87206db954cefc9d8..499bf3801af96b5938339c34eba9b599dc7b687d 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 729f8936e329269f7a9bf831807b8ae1c6df0095..c53c01ea4be968023f31b902848e31461db31c03 100644 (file)
@@ -3179,13 +3179,10 @@ arc_flush(spa_t *spa, boolean_t retry)
 void
 arc_shrink(int64_t to_free)
 {
-       if (arc_c > arc_c_min) {
-
-               if (arc_c > arc_c_min + to_free)
-                       atomic_add_64(&arc_c, -to_free);
-               else
-                       arc_c = arc_c_min;
+       uint64_t c = arc_c;
 
+       if (c > to_free && c - to_free > arc_c_min) {
+               arc_c = c - to_free;
                atomic_add_64(&arc_p, -(arc_p >> arc_shrink_shift));
                if (arc_c > arc_size)
                        arc_c = MAX(arc_size, arc_c_min);
@@ -3193,6 +3190,8 @@ arc_shrink(int64_t to_free)
                        arc_p = (arc_c >> 1);
                ASSERT(arc_c >= arc_c_min);
                ASSERT((int64_t)arc_p >= 0);
+       } else {
+               arc_c = arc_c_min;
        }
 
        if (arc_size > arc_c)
@@ -3762,7 +3761,7 @@ arc_adapt(int bytes, arc_state_t *state)
         * If we're within (2 * maxblocksize) bytes of the target
         * cache size, increment the target cache size
         */
-       VERIFY3U(arc_c, >=, 2ULL << SPA_MAXBLOCKSHIFT);
+       ASSERT3U(arc_c, >=, 2ULL << SPA_MAXBLOCKSHIFT);
        if (arc_size >= arc_c - (2ULL << SPA_MAXBLOCKSHIFT)) {
                atomic_add_64(&arc_c, (int64_t)bytes);
                if (arc_c > arc_c_max)
@@ -5105,7 +5104,9 @@ arc_tempreserve_space(uint64_t reserve, uint64_t txg)
        int error;
        uint64_t anon_size;
 
-       if (reserve > arc_c/4 && !arc_no_grow)
+       if (!arc_no_grow &&
+           reserve > arc_c/4 &&
+           reserve * 4 > (2ULL << SPA_MAXBLOCKSHIFT))
                arc_c = MIN(arc_c_max, reserve * 4);
 
        /*
index 2383252e2447b1dc22cd65b7f3dcf480ed5a31b8..d6ac5fcc709a05a676cf8227e8a8f35bdd3470d6 100644 (file)
@@ -1464,6 +1464,8 @@ sa_lookup(sa_handle_t *hdl, sa_attr_type_t attr, void *buf, uint32_t buflen)
        int error;
        sa_bulk_attr_t bulk;
 
+       VERIFY3U(buflen, <=, SA_ATTR_MAX_LEN);
+
        bulk.sa_attr = attr;
        bulk.sa_data = buf;
        bulk.sa_length = buflen;
@@ -1836,6 +1838,8 @@ sa_update(sa_handle_t *hdl, sa_attr_type_t type,
        int error;
        sa_bulk_attr_t bulk;
 
+       VERIFY3U(buflen, <=, SA_ATTR_MAX_LEN);
+
        bulk.sa_attr = type;
        bulk.sa_data_func = NULL;
        bulk.sa_length = buflen;
@@ -1854,6 +1858,8 @@ sa_update_from_cb(sa_handle_t *hdl, sa_attr_type_t attr,
        int error;
        sa_bulk_attr_t bulk;
 
+       VERIFY3U(buflen, <=, SA_ATTR_MAX_LEN);
+
        bulk.sa_attr = attr;
        bulk.sa_data = userdata;
        bulk.sa_data_func = locator;
index c9a9da7528d73b4a8e3d9df2a387b5a278cf4482..fa1a679e177a9031b55057d968383a6466af5f14 100644 (file)
@@ -229,6 +229,8 @@ zfs_sa_set_xattr(znode_t *zp)
        ASSERT(zp->z_is_sa);
 
        error = nvlist_size(zp->z_xattr_cached, &size, NV_ENCODE_XDR);
+       if ((error == 0) && (size > SA_ATTR_MAX_LEN))
+               error = EFBIG;
        if (error)
                goto out;
 
@@ -247,12 +249,9 @@ zfs_sa_set_xattr(znode_t *zp)
        if (error) {
                dmu_tx_abort(tx);
        } else {
-               error = sa_update(zp->z_sa_hdl, SA_ZPL_DXATTR(zsb),
-                   obj, size, tx);
-               if (error)
-                       dmu_tx_abort(tx);
-               else
-                       dmu_tx_commit(tx);
+               VERIFY0(sa_update(zp->z_sa_hdl, SA_ZPL_DXATTR(zsb),
+                   obj, size, tx));
+               dmu_tx_commit(tx);
        }
 out_free:
        zio_buf_free(obj, size);
index f105d9aeda123d5b789e8785ff5e5cf77da07e45..7d8332ac8580308b502b3fb51199331d61c5c8e2 100644 (file)
@@ -694,7 +694,7 @@ zfs_sb_create(const char *osname, zfs_mntopts_t *zmo, zfs_sb_t **zsbp)
        objset_t *os;
        zfs_sb_t *zsb;
        uint64_t zval;
-       int i, error;
+       int i, size, error;
        uint64_t sa_obj;
 
        zsb = kmem_zalloc(sizeof (zfs_sb_t), KM_SLEEP);
@@ -716,8 +716,7 @@ zfs_sb_create(const char *osname, zfs_mntopts_t *zmo, zfs_sb_t **zsbp)
 
        /*
         * Initialize the zfs-specific filesystem structure.
-        * Should probably make this a kmem cache, shuffle fields,
-        * and just bzero up to z_hold_mtx[].
+        * Should probably make this a kmem cache, shuffle fields.
         */
        zsb->z_sb = NULL;
        zsb->z_parent = zsb;
@@ -826,10 +825,15 @@ zfs_sb_create(const char *osname, zfs_mntopts_t *zmo, zfs_sb_t **zsbp)
        rw_init(&zsb->z_teardown_inactive_lock, NULL, RW_DEFAULT, NULL);
        rw_init(&zsb->z_fuid_lock, NULL, RW_DEFAULT, NULL);
 
-       zsb->z_hold_mtx = vmem_zalloc(sizeof (kmutex_t) * ZFS_OBJ_MTX_SZ,
-           KM_SLEEP);
-       for (i = 0; i != ZFS_OBJ_MTX_SZ; i++)
-               mutex_init(&zsb->z_hold_mtx[i], NULL, MUTEX_DEFAULT, NULL);
+       size = MIN(1 << (highbit64(zfs_object_mutex_size)-1), ZFS_OBJ_MTX_MAX);
+       zsb->z_hold_size = size;
+       zsb->z_hold_trees = vmem_zalloc(sizeof (avl_tree_t) * size, KM_SLEEP);
+       zsb->z_hold_locks = vmem_zalloc(sizeof (kmutex_t) * size, KM_SLEEP);
+       for (i = 0; i != size; i++) {
+               avl_create(&zsb->z_hold_trees[i], zfs_znode_hold_compare,
+                   sizeof (znode_hold_t), offsetof(znode_hold_t, zh_node));
+               mutex_init(&zsb->z_hold_locks[i], NULL, MUTEX_DEFAULT, NULL);
+       }
 
        *zsbp = zsb;
        return (0);
@@ -838,7 +842,6 @@ out:
        dmu_objset_disown(os, zsb);
        *zsbp = NULL;
 
-       vmem_free(zsb->z_hold_mtx, sizeof (kmutex_t) * ZFS_OBJ_MTX_SZ);
        kmem_free(zsb, sizeof (zfs_sb_t));
        return (error);
 }
@@ -930,7 +933,7 @@ EXPORT_SYMBOL(zfs_sb_setup);
 void
 zfs_sb_free(zfs_sb_t *zsb)
 {
-       int i;
+       int i, size = zsb->z_hold_size;
 
        zfs_fuid_destroy(zsb);
 
@@ -940,9 +943,12 @@ zfs_sb_free(zfs_sb_t *zsb)
        rrm_destroy(&zsb->z_teardown_lock);
        rw_destroy(&zsb->z_teardown_inactive_lock);
        rw_destroy(&zsb->z_fuid_lock);
-       for (i = 0; i != ZFS_OBJ_MTX_SZ; i++)
-               mutex_destroy(&zsb->z_hold_mtx[i]);
-       vmem_free(zsb->z_hold_mtx, sizeof (kmutex_t) * ZFS_OBJ_MTX_SZ);
+       for (i = 0; i != size; i++) {
+               avl_destroy(&zsb->z_hold_trees[i]);
+               mutex_destroy(&zsb->z_hold_locks[i]);
+       }
+       vmem_free(zsb->z_hold_trees, sizeof (avl_tree_t) * size);
+       vmem_free(zsb->z_hold_locks, sizeof (kmutex_t) * size);
        zfs_mntopts_free(zsb->z_mntopts);
        kmem_free(zsb, sizeof (zfs_sb_t));
 }
index 1eefec4d3e6400e26523f8cf40793ff463624d61..860354b11bf782a93c24cfac7e3d3c4fe78afcdd 100644 (file)
@@ -95,6 +95,8 @@
 #ifdef _KERNEL
 
 static kmem_cache_t *znode_cache = NULL;
+static kmem_cache_t *znode_hold_cache = NULL;
+unsigned int zfs_object_mutex_size = ZFS_OBJ_MTX_SZ;
 
 /*ARGSUSED*/
 static int
@@ -144,6 +146,27 @@ zfs_znode_cache_destructor(void *buf, void *arg)
        ASSERT(zp->z_xattr_parent == NULL);
 }
 
+static int
+zfs_znode_hold_cache_constructor(void *buf, void *arg, int kmflags)
+{
+       znode_hold_t *zh = buf;
+
+       mutex_init(&zh->zh_lock, NULL, MUTEX_DEFAULT, NULL);
+       refcount_create(&zh->zh_refcount);
+       zh->zh_obj = ZFS_NO_OBJECT;
+
+       return (0);
+}
+
+static void
+zfs_znode_hold_cache_destructor(void *buf, void *arg)
+{
+       znode_hold_t *zh = buf;
+
+       mutex_destroy(&zh->zh_lock);
+       refcount_destroy(&zh->zh_refcount);
+}
+
 void
 zfs_znode_init(void)
 {
@@ -156,6 +179,11 @@ zfs_znode_init(void)
        znode_cache = kmem_cache_create("zfs_znode_cache",
            sizeof (znode_t), 0, zfs_znode_cache_constructor,
            zfs_znode_cache_destructor, NULL, NULL, NULL, KMC_SLAB);
+
+       ASSERT(znode_hold_cache == NULL);
+       znode_hold_cache = kmem_cache_create("zfs_znode_hold_cache",
+           sizeof (znode_hold_t), 0, zfs_znode_hold_cache_constructor,
+           zfs_znode_hold_cache_destructor, NULL, NULL, NULL, 0);
 }
 
 void
@@ -167,6 +195,123 @@ zfs_znode_fini(void)
        if (znode_cache)
                kmem_cache_destroy(znode_cache);
        znode_cache = NULL;
+
+       if (znode_hold_cache)
+               kmem_cache_destroy(znode_hold_cache);
+       znode_hold_cache = NULL;
+}
+
+/*
+ * The zfs_znode_hold_enter() / zfs_znode_hold_exit() functions are used to
+ * serialize access to a znode and its SA buffer while the object is being
+ * created or destroyed.  This kind of locking would normally reside in the
+ * znode itself but in this case that's impossible because the znode and SA
+ * buffer may not yet exist.  Therefore the locking is handled externally
+ * with an array of mutexs and AVLs trees which contain per-object locks.
+ *
+ * In zfs_znode_hold_enter() a per-object lock is created as needed, inserted
+ * in to the correct AVL tree and finally the per-object lock is held.  In
+ * zfs_znode_hold_exit() the process is reversed.  The per-object lock is
+ * released, removed from the AVL tree and destroyed if there are no waiters.
+ *
+ * This scheme has two important properties:
+ *
+ * 1) No memory allocations are performed while holding one of the z_hold_locks.
+ *    This ensures evict(), which can be called from direct memory reclaim, will
+ *    never block waiting on a z_hold_locks which just happens to have hashed
+ *    to the same index.
+ *
+ * 2) All locks used to serialize access to an object are per-object and never
+ *    shared.  This minimizes lock contention without creating a large number
+ *    of dedicated locks.
+ *
+ * On the downside it does require znode_lock_t structures to be frequently
+ * allocated and freed.  However, because these are backed by a kmem cache
+ * and very short lived this cost is minimal.
+ */
+int
+zfs_znode_hold_compare(const void *a, const void *b)
+{
+       const znode_hold_t *zh_a = a;
+       const znode_hold_t *zh_b = b;
+
+       if (zh_a->zh_obj < zh_b->zh_obj)
+               return (-1);
+       else if (zh_a->zh_obj > zh_b->zh_obj)
+               return (1);
+       else
+               return (0);
+}
+
+boolean_t
+zfs_znode_held(zfs_sb_t *zsb, uint64_t obj)
+{
+       znode_hold_t *zh, search;
+       int i = ZFS_OBJ_HASH(zsb, obj);
+       boolean_t held;
+
+       search.zh_obj = obj;
+
+       mutex_enter(&zsb->z_hold_locks[i]);
+       zh = avl_find(&zsb->z_hold_trees[i], &search, NULL);
+       held = (zh && MUTEX_HELD(&zh->zh_lock)) ? B_TRUE : B_FALSE;
+       mutex_exit(&zsb->z_hold_locks[i]);
+
+       return (held);
+}
+
+static znode_hold_t *
+zfs_znode_hold_enter(zfs_sb_t *zsb, uint64_t obj)
+{
+       znode_hold_t *zh, *zh_new, search;
+       int i = ZFS_OBJ_HASH(zsb, obj);
+       boolean_t found = B_FALSE;
+
+       zh_new = kmem_cache_alloc(znode_hold_cache, KM_SLEEP);
+       zh_new->zh_obj = obj;
+       search.zh_obj = obj;
+
+       mutex_enter(&zsb->z_hold_locks[i]);
+       zh = avl_find(&zsb->z_hold_trees[i], &search, NULL);
+       if (likely(zh == NULL)) {
+               zh = zh_new;
+               avl_add(&zsb->z_hold_trees[i], zh);
+       } else {
+               ASSERT3U(zh->zh_obj, ==, obj);
+               found = B_TRUE;
+       }
+       refcount_add(&zh->zh_refcount, NULL);
+       mutex_exit(&zsb->z_hold_locks[i]);
+
+       if (found == B_TRUE)
+               kmem_cache_free(znode_hold_cache, zh_new);
+
+       ASSERT(MUTEX_NOT_HELD(&zh->zh_lock));
+       ASSERT3S(refcount_count(&zh->zh_refcount), >, 0);
+       mutex_enter(&zh->zh_lock);
+
+       return (zh);
+}
+
+static void
+zfs_znode_hold_exit(zfs_sb_t *zsb, znode_hold_t *zh)
+{
+       int i = ZFS_OBJ_HASH(zsb, zh->zh_obj);
+       boolean_t remove = B_FALSE;
+
+       ASSERT(zfs_znode_held(zsb, zh->zh_obj));
+       ASSERT3S(refcount_count(&zh->zh_refcount), >, 0);
+       mutex_exit(&zh->zh_lock);
+
+       mutex_enter(&zsb->z_hold_locks[i]);
+       if (refcount_remove(&zh->zh_refcount, NULL) == 0) {
+               avl_remove(&zsb->z_hold_trees[i], zh);
+               remove = B_TRUE;
+       }
+       mutex_exit(&zsb->z_hold_locks[i]);
+
+       if (remove == B_TRUE)
+               kmem_cache_free(znode_hold_cache, zh);
 }
 
 int
@@ -221,7 +366,7 @@ static void
 zfs_znode_sa_init(zfs_sb_t *zsb, znode_t *zp,
     dmu_buf_t *db, dmu_object_type_t obj_type, sa_handle_t *sa_hdl)
 {
-       ASSERT(MUTEX_HELD(ZFS_OBJ_MUTEX(zsb, zp->z_id)));
+       ASSERT(zfs_znode_held(zsb, zp->z_id));
 
        mutex_enter(&zp->z_lock);
 
@@ -243,8 +388,7 @@ zfs_znode_sa_init(zfs_sb_t *zsb, znode_t *zp,
 void
 zfs_znode_dmu_fini(znode_t *zp)
 {
-       ASSERT(MUTEX_HELD(ZFS_OBJ_MUTEX(ZTOZSB(zp), zp->z_id)) ||
-           zp->z_unlinked ||
+       ASSERT(zfs_znode_held(ZTOZSB(zp), zp->z_id) || zp->z_unlinked ||
            RW_WRITE_HELD(&ZTOZSB(zp)->z_teardown_inactive_lock));
 
        sa_handle_destroy(zp->z_sa_hdl);
@@ -570,6 +714,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr,
        sa_bulk_attr_t  *sa_attrs;
        int             cnt = 0;
        zfs_acl_locator_cb_t locate = { 0 };
+       znode_hold_t    *zh;
 
        if (zsb->z_replay) {
                obj = vap->va_nodeid;
@@ -616,7 +761,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr,
                }
        }
 
-       ZFS_OBJ_HOLD_ENTER(zsb, obj);
+       zh = zfs_znode_hold_enter(zsb, obj);
        VERIFY(0 == sa_buf_hold(zsb->z_os, obj, NULL, &db));
 
        /*
@@ -790,7 +935,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr,
                VERIFY0(zfs_aclset_common(*zpp, acl_ids->z_aclp, cr, tx));
        }
        kmem_free(sa_attrs, sizeof (sa_bulk_attr_t) * ZPL_END);
-       ZFS_OBJ_HOLD_EXIT(zsb, obj);
+       zfs_znode_hold_exit(zsb, zh);
 }
 
 /*
@@ -894,17 +1039,18 @@ zfs_zget(zfs_sb_t *zsb, uint64_t obj_num, znode_t **zpp)
        dmu_object_info_t doi;
        dmu_buf_t       *db;
        znode_t         *zp;
+       znode_hold_t    *zh;
        int err;
        sa_handle_t     *hdl;
 
        *zpp = NULL;
 
 again:
-       ZFS_OBJ_HOLD_ENTER(zsb, obj_num);
+       zh = zfs_znode_hold_enter(zsb, obj_num);
 
        err = sa_buf_hold(zsb->z_os, obj_num, NULL, &db);
        if (err) {
-               ZFS_OBJ_HOLD_EXIT(zsb, obj_num);
+               zfs_znode_hold_exit(zsb, zh);
                return (err);
        }
 
@@ -914,7 +1060,7 @@ again:
            (doi.doi_bonus_type == DMU_OT_ZNODE &&
            doi.doi_bonus_size < sizeof (znode_phys_t)))) {
                sa_buf_rele(db, NULL);
-               ZFS_OBJ_HOLD_EXIT(zsb, obj_num);
+               zfs_znode_hold_exit(zsb, zh);
                return (SET_ERROR(EINVAL));
        }
 
@@ -953,7 +1099,7 @@ again:
                        if (igrab(ZTOI(zp)) == NULL) {
                                mutex_exit(&zp->z_lock);
                                sa_buf_rele(db, NULL);
-                               ZFS_OBJ_HOLD_EXIT(zsb, obj_num);
+                               zfs_znode_hold_exit(zsb, zh);
                                /* inode might need this to finish evict */
                                cond_resched();
                                goto again;
@@ -963,7 +1109,7 @@ again:
                }
                mutex_exit(&zp->z_lock);
                sa_buf_rele(db, NULL);
-               ZFS_OBJ_HOLD_EXIT(zsb, obj_num);
+               zfs_znode_hold_exit(zsb, zh);
                return (err);
        }
 
@@ -984,7 +1130,7 @@ again:
        } else {
                *zpp = zp;
        }
-       ZFS_OBJ_HOLD_EXIT(zsb, obj_num);
+       zfs_znode_hold_exit(zsb, zh);
        return (err);
 }
 
@@ -1000,8 +1146,9 @@ zfs_rezget(znode_t *zp)
        int err;
        int count = 0;
        uint64_t gen;
+       znode_hold_t *zh;
 
-       ZFS_OBJ_HOLD_ENTER(zsb, obj_num);
+       zh = zfs_znode_hold_enter(zsb, obj_num);
 
        mutex_enter(&zp->z_acl_lock);
        if (zp->z_acl_cached) {
@@ -1025,7 +1172,7 @@ zfs_rezget(znode_t *zp)
        ASSERT(zp->z_sa_hdl == NULL);
        err = sa_buf_hold(zsb->z_os, obj_num, NULL, &db);
        if (err) {
-               ZFS_OBJ_HOLD_EXIT(zsb, obj_num);
+               zfs_znode_hold_exit(zsb, zh);
                return (err);
        }
 
@@ -1035,7 +1182,7 @@ zfs_rezget(znode_t *zp)
            (doi.doi_bonus_type == DMU_OT_ZNODE &&
            doi.doi_bonus_size < sizeof (znode_phys_t)))) {
                sa_buf_rele(db, NULL);
-               ZFS_OBJ_HOLD_EXIT(zsb, obj_num);
+               zfs_znode_hold_exit(zsb, zh);
                return (SET_ERROR(EINVAL));
        }
 
@@ -1061,7 +1208,7 @@ zfs_rezget(znode_t *zp)
 
        if (sa_bulk_lookup(zp->z_sa_hdl, bulk, count)) {
                zfs_znode_dmu_fini(zp);
-               ZFS_OBJ_HOLD_EXIT(zsb, obj_num);
+               zfs_znode_hold_exit(zsb, zh);
                return (SET_ERROR(EIO));
        }
 
@@ -1069,7 +1216,7 @@ zfs_rezget(znode_t *zp)
 
        if (gen != zp->z_gen) {
                zfs_znode_dmu_fini(zp);
-               ZFS_OBJ_HOLD_EXIT(zsb, obj_num);
+               zfs_znode_hold_exit(zsb, zh);
                return (SET_ERROR(EIO));
        }
 
@@ -1077,7 +1224,7 @@ zfs_rezget(znode_t *zp)
        zp->z_blksz = doi.doi_data_block_size;
        zfs_inode_update(zp);
 
-       ZFS_OBJ_HOLD_EXIT(zsb, obj_num);
+       zfs_znode_hold_exit(zsb, zh);
 
        return (0);
 }
@@ -1089,15 +1236,16 @@ zfs_znode_delete(znode_t *zp, dmu_tx_t *tx)
        objset_t *os = zsb->z_os;
        uint64_t obj = zp->z_id;
        uint64_t acl_obj = zfs_external_acl(zp);
+       znode_hold_t *zh;
 
-       ZFS_OBJ_HOLD_ENTER(zsb, obj);
+       zh = zfs_znode_hold_enter(zsb, obj);
        if (acl_obj) {
                VERIFY(!zp->z_is_sa);
                VERIFY(0 == dmu_object_free(os, acl_obj, tx));
        }
        VERIFY(0 == dmu_object_free(os, obj, tx));
        zfs_znode_dmu_fini(zp);
-       ZFS_OBJ_HOLD_EXIT(zsb, obj);
+       zfs_znode_hold_exit(zsb, zh);
 }
 
 void
@@ -1105,13 +1253,14 @@ zfs_zinactive(znode_t *zp)
 {
        zfs_sb_t *zsb = ZTOZSB(zp);
        uint64_t z_id = zp->z_id;
+       znode_hold_t *zh;
 
        ASSERT(zp->z_sa_hdl);
 
        /*
         * Don't allow a zfs_zget() while were trying to release this znode.
         */
-       ZFS_OBJ_HOLD_ENTER(zsb, z_id);
+       zh = zfs_znode_hold_enter(zsb, z_id);
 
        mutex_enter(&zp->z_lock);
 
@@ -1121,9 +1270,7 @@ zfs_zinactive(znode_t *zp)
         */
        if (zp->z_unlinked) {
                mutex_exit(&zp->z_lock);
-
-               ZFS_OBJ_HOLD_EXIT(zsb, z_id);
-
+               zfs_znode_hold_exit(zsb, zh);
                zfs_rmnode(zp);
                return;
        }
@@ -1131,7 +1278,7 @@ zfs_zinactive(znode_t *zp)
        mutex_exit(&zp->z_lock);
        zfs_znode_dmu_fini(zp);
 
-       ZFS_OBJ_HOLD_EXIT(zsb, z_id);
+       zfs_znode_hold_exit(zsb, zh);
 }
 
 static inline int
@@ -1621,6 +1768,7 @@ zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx)
        uint64_t        sense = ZFS_CASE_SENSITIVE;
        uint64_t        norm = 0;
        nvpair_t        *elem;
+       int             size;
        int             error;
        int             i;
        znode_t         *rootzp = NULL;
@@ -1732,10 +1880,15 @@ zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx)
        list_create(&zsb->z_all_znodes, sizeof (znode_t),
            offsetof(znode_t, z_link_node));
 
-       zsb->z_hold_mtx = vmem_zalloc(sizeof (kmutex_t) * ZFS_OBJ_MTX_SZ,
-           KM_SLEEP);
-       for (i = 0; i != ZFS_OBJ_MTX_SZ; i++)
-               mutex_init(&zsb->z_hold_mtx[i], NULL, MUTEX_DEFAULT, NULL);
+       size = MIN(1 << (highbit64(zfs_object_mutex_size)-1), ZFS_OBJ_MTX_MAX);
+       zsb->z_hold_size = size;
+       zsb->z_hold_trees = vmem_zalloc(sizeof (avl_tree_t) * size, KM_SLEEP);
+       zsb->z_hold_locks = vmem_zalloc(sizeof (kmutex_t) * size, KM_SLEEP);
+       for (i = 0; i != size; i++) {
+               avl_create(&zsb->z_hold_trees[i], zfs_znode_hold_compare,
+                   sizeof (znode_hold_t), offsetof(znode_hold_t, zh_node));
+               mutex_init(&zsb->z_hold_locks[i], NULL, MUTEX_DEFAULT, NULL);
+       }
 
        VERIFY(0 == zfs_acl_ids_create(rootzp, IS_ROOT_NODE, &vattr,
            cr, NULL, &acl_ids));
@@ -1755,10 +1908,13 @@ zfs_create_fs(objset_t *os, cred_t *cr, nvlist_t *zplprops, dmu_tx_t *tx)
        error = zfs_create_share_dir(zsb, tx);
        ASSERT(error == 0);
 
-       for (i = 0; i != ZFS_OBJ_MTX_SZ; i++)
-               mutex_destroy(&zsb->z_hold_mtx[i]);
+       for (i = 0; i != size; i++) {
+               avl_destroy(&zsb->z_hold_trees[i]);
+               mutex_destroy(&zsb->z_hold_locks[i]);
+       }
 
-       vmem_free(zsb->z_hold_mtx, sizeof (kmutex_t) * ZFS_OBJ_MTX_SZ);
+       vmem_free(zsb->z_hold_trees, sizeof (avl_tree_t) * size);
+       vmem_free(zsb->z_hold_locks, sizeof (kmutex_t) * size);
        kmem_free(sb, sizeof (struct super_block));
        kmem_free(zsb, sizeof (zfs_sb_t));
 }
@@ -1995,4 +2151,7 @@ zfs_obj_to_stats(objset_t *osp, uint64_t obj, zfs_stat_t *sb,
 #if defined(_KERNEL) && defined(HAVE_SPL)
 EXPORT_SYMBOL(zfs_create_fs);
 EXPORT_SYMBOL(zfs_obj_to_path);
+
+module_param(zfs_object_mutex_size, uint, 0644);
+MODULE_PARM_DESC(zfs_object_mutex_size, "Size of znode hold array");
 #endif
index e0e8ee3ac58304efd0f013a8d4c180d12d6a0e63..bd0d5129c1f380f5bc09ca410aa6656fea9e8bef 100644 (file)
@@ -339,26 +339,42 @@ zpl_symlink(struct inode *dir, struct dentry *dentry, const char *name)
        return (error);
 }
 
-#ifdef HAVE_FOLLOW_LINK_NAMEIDATA
-static void *
-zpl_follow_link(struct dentry *dentry, struct nameidata *nd)
-#else
-const char *
-zpl_follow_link(struct dentry *dentry, void **symlink_cookie)
+#if defined(HAVE_PUT_LINK_COOKIE)
+static void
+zpl_put_link(struct inode *unused, void *cookie)
+{
+       kmem_free(cookie, MAXPATHLEN);
+}
+#elif defined(HAVE_PUT_LINK_NAMEIDATA)
+static void
+zpl_put_link(struct dentry *dentry, struct nameidata *nd, void *ptr)
+{
+       const char *link = nd_get_link(nd);
+
+       if (!IS_ERR(link))
+               kmem_free(link, MAXPATHLEN);
+}
+#elif defined(HAVE_PUT_LINK_DELAYED)
+static void
+zpl_put_link(void *ptr)
+{
+       kmem_free(ptr, MAXPATHLEN);
+}
 #endif
+
+static int
+zpl_get_link_common(struct dentry *dentry, struct inode *ip, char **link)
 {
+       fstrans_cookie_t cookie;
        cred_t *cr = CRED();
-       struct inode *ip = dentry->d_inode;
        struct iovec iov;
        uio_t uio;
-       char *link;
        int error;
-       fstrans_cookie_t cookie;
 
        crhold(cr);
-
+       *link = NULL;
        iov.iov_len = MAXPATHLEN;
-       iov.iov_base = link = kmem_zalloc(MAXPATHLEN, KM_SLEEP);
+       iov.iov_base = kmem_zalloc(MAXPATHLEN, KM_SLEEP);
 
        uio.uio_iov = &iov;
        uio.uio_iovcnt = 1;
@@ -369,41 +385,78 @@ zpl_follow_link(struct dentry *dentry, void **symlink_cookie)
        cookie = spl_fstrans_mark();
        error = -zfs_readlink(ip, &uio, cr);
        spl_fstrans_unmark(cookie);
-
-       if (error)
-               kmem_free(link, MAXPATHLEN);
-
        crfree(cr);
 
-#ifdef HAVE_FOLLOW_LINK_NAMEIDATA
        if (error)
-               nd_set_link(nd, ERR_PTR(error));
+               kmem_free(iov.iov_base, MAXPATHLEN);
        else
-               nd_set_link(nd, link);
+               *link = iov.iov_base;
 
-       return (NULL);
-#else
+       return (error);
+}
+
+#if defined(HAVE_GET_LINK_DELAYED)
+const char *
+zpl_get_link(struct dentry *dentry, struct inode *inode,
+    struct delayed_call *done)
+{
+       char *link = NULL;
+       int error;
+
+       if (!dentry)
+               return (ERR_PTR(-ECHILD));
+
+       error = zpl_get_link_common(dentry, inode, &link);
        if (error)
                return (ERR_PTR(error));
-       else
-               return (*symlink_cookie = link);
-#endif
+
+       set_delayed_call(done, zpl_put_link, link);
+
+       return (link);
 }
+#elif defined(HAVE_GET_LINK_COOKIE)
+const char *
+zpl_get_link(struct dentry *dentry, struct inode *inode, void **cookie)
+{
+       char *link = NULL;
+       int error;
 
-#ifdef HAVE_PUT_LINK_NAMEIDATA
-static void
-zpl_put_link(struct dentry *dentry, struct nameidata *nd, void *ptr)
+       if (!dentry)
+               return (ERR_PTR(-ECHILD));
+
+       error = zpl_get_link_common(dentry, inode, &link);
+       if (error)
+               return (ERR_PTR(error));
+
+       return (*cookie = link);
+}
+#elif defined(HAVE_FOLLOW_LINK_COOKIE)
+const char *
+zpl_follow_link(struct dentry *dentry, void **cookie)
 {
-       const char *link = nd_get_link(nd);
+       char *link = NULL;
+       int error;
 
-       if (!IS_ERR(link))
-               kmem_free(link, MAXPATHLEN);
+       error = zpl_get_link_common(dentry, dentry->d_inode, &link);
+       if (error)
+               return (ERR_PTR(error));
+
+       return (*cookie = link);
 }
-#else
-static void
-zpl_put_link(struct inode *unused, void *symlink_cookie)
+#elif defined(HAVE_FOLLOW_LINK_NAMEIDATA)
+static void *
+zpl_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
-       kmem_free(symlink_cookie, MAXPATHLEN);
+       char *link = NULL;
+       int error;
+
+       error = zpl_get_link_common(dentry, dentry->d_inode, &link);
+       if (error)
+               nd_set_link(nd, ERR_PTR(error));
+       else
+               nd_set_link(nd, link);
+
+       return (NULL);
 }
 #endif
 
@@ -591,8 +644,14 @@ const struct inode_operations zpl_dir_inode_operations = {
 
 const struct inode_operations zpl_symlink_inode_operations = {
        .readlink       = generic_readlink,
+#if defined(HAVE_GET_LINK_DELAYED) || defined(HAVE_GET_LINK_COOKIE)
+       .get_link       = zpl_get_link,
+#elif defined(HAVE_FOLLOW_LINK_COOKIE) || defined(HAVE_FOLLOW_LINK_NAMEIDATA)
        .follow_link    = zpl_follow_link,
+#endif
+#if defined(HAVE_PUT_LINK_COOKIE) || defined(HAVE_PUT_LINK_NAMEIDATA)
        .put_link       = zpl_put_link,
+#endif
        .setattr        = zpl_setattr,
        .getattr        = zpl_getattr,
        .setxattr       = generic_setxattr,
index d9d0673051e45e7806df607b6fef0d5f6837625c..6a1acd7f47084253e4c68c106fc4a3b54b0d5802 100644 (file)
@@ -88,19 +88,50 @@ typedef struct xattr_filldir {
        size_t size;
        size_t offset;
        char *buf;
-       struct inode *inode;
+       struct dentry *dentry;
 } xattr_filldir_t;
 
+static const struct xattr_handler *zpl_xattr_handler(const char *);
+
 static int
-zpl_xattr_filldir(xattr_filldir_t *xf, const char *name, int name_len)
+zpl_xattr_permission(xattr_filldir_t *xf, const char *name, int name_len)
 {
-       if (strncmp(name, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) == 0)
-               if (!(ITOZSB(xf->inode)->z_flags & ZSB_XATTR))
-                       return (0);
+       static const struct xattr_handler *handler;
+       struct dentry *d = xf->dentry;
 
-       if (strncmp(name, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) == 0)
-               if (!capable(CAP_SYS_ADMIN))
+       handler = zpl_xattr_handler(name);
+       if (!handler)
+               return (0);
+
+       if (handler->list) {
+#if defined(HAVE_XATTR_LIST_SIMPLE)
+               if (!handler->list(d))
+                       return (0);
+#elif defined(HAVE_XATTR_LIST_DENTRY)
+               if (!handler->list(d, NULL, 0, name, name_len, 0))
+                       return (0);
+#elif defined(HAVE_XATTR_LIST_HANDLER)
+               if (!handler->list(handler, d, NULL, 0, name, name_len))
                        return (0);
+#elif defined(HAVE_XATTR_LIST_INODE)
+               if (!handler->list(d->d_inode, NULL, 0, name, name_len))
+                       return (0);
+#endif
+       }
+
+       return (1);
+}
+
+/*
+ * Determine is a given xattr name should be visible and if so copy it
+ * in to the provided buffer (xf->buf).
+ */
+static int
+zpl_xattr_filldir(xattr_filldir_t *xf, const char *name, int name_len)
+{
+       /* Check permissions using the per-namespace list xattr handler. */
+       if (!zpl_xattr_permission(xf, name, name_len))
+               return (0);
 
        /* When xf->buf is NULL only calculate the required size. */
        if (xf->buf) {
@@ -154,7 +185,7 @@ zpl_xattr_readdir(struct inode *dxip, xattr_filldir_t *xf)
 static ssize_t
 zpl_xattr_list_dir(xattr_filldir_t *xf, cred_t *cr)
 {
-       struct inode *ip = xf->inode;
+       struct inode *ip = xf->dentry->d_inode;
        struct inode *dxip = NULL;
        int error;
 
@@ -176,7 +207,7 @@ zpl_xattr_list_dir(xattr_filldir_t *xf, cred_t *cr)
 static ssize_t
 zpl_xattr_list_sa(xattr_filldir_t *xf)
 {
-       znode_t *zp = ITOZ(xf->inode);
+       znode_t *zp = ITOZ(xf->dentry->d_inode);
        nvpair_t *nvp = NULL;
        int error = 0;
 
@@ -207,7 +238,7 @@ zpl_xattr_list(struct dentry *dentry, char *buffer, size_t buffer_size)
 {
        znode_t *zp = ITOZ(dentry->d_inode);
        zfs_sb_t *zsb = ZTOZSB(zp);
-       xattr_filldir_t xf = { buffer_size, 0, buffer, dentry->d_inode };
+       xattr_filldir_t xf = { buffer_size, 0, buffer, dentry };
        cred_t *cr = CRED();
        fstrans_cookie_t cookie;
        int error = 0;
@@ -337,6 +368,45 @@ out:
        return (error);
 }
 
+#define        XATTR_NOENT     0x0
+#define        XATTR_IN_SA     0x1
+#define        XATTR_IN_DIR    0x2
+/* check where the xattr resides */
+static int
+__zpl_xattr_where(struct inode *ip, const char *name, int *where, cred_t *cr)
+{
+       znode_t *zp = ITOZ(ip);
+       zfs_sb_t *zsb = ZTOZSB(zp);
+       int error;
+
+       ASSERT(where);
+       ASSERT(RW_LOCK_HELD(&zp->z_xattr_lock));
+
+       *where = XATTR_NOENT;
+       if (zsb->z_use_sa && zp->z_is_sa) {
+               error = zpl_xattr_get_sa(ip, name, NULL, 0);
+               if (error >= 0)
+                       *where |= XATTR_IN_SA;
+               else if (error != -ENOENT)
+                       return (error);
+       }
+
+       error = zpl_xattr_get_dir(ip, name, NULL, 0, cr);
+       if (error >= 0)
+               *where |= XATTR_IN_DIR;
+       else if (error != -ENOENT)
+               return (error);
+
+       if (*where == (XATTR_IN_SA|XATTR_IN_DIR))
+               cmn_err(CE_WARN, "ZFS: inode %p has xattr \"%s\""
+                   " in both SA and dir", ip, name);
+       if (*where == XATTR_NOENT)
+               error = -ENODATA;
+       else
+               error = 0;
+       return (error);
+}
+
 static int
 zpl_xattr_get(struct inode *ip, const char *name, void *value, size_t size)
 {
@@ -449,7 +519,15 @@ zpl_xattr_set_sa(struct inode *ip, const char *name, const void *value,
        znode_t *zp = ITOZ(ip);
        nvlist_t *nvl;
        size_t sa_size;
-       int error;
+       int error = 0;
+
+       mutex_enter(&zp->z_lock);
+       if (zp->z_xattr_cached == NULL)
+               error = -zfs_sa_get_xattr(zp);
+       mutex_exit(&zp->z_lock);
+
+       if (error)
+               return (error);
 
        ASSERT(zp->z_xattr_cached);
        nvl = zp->z_xattr_cached;
@@ -473,14 +551,21 @@ zpl_xattr_set_sa(struct inode *ip, const char *name, const void *value,
 
                error = -nvlist_add_byte_array(nvl, name,
                    (uchar_t *)value, size);
-               if (error)
-                       return (error);
        }
 
-       /* Update the SA for additions, modifications, and removals. */
-       if (!error)
+       /*
+        * Update the SA for additions, modifications, and removals. On
+        * error drop the inconsistent cached version of the nvlist, it
+        * will be reconstructed from the ARC when next accessed.
+        */
+       if (error == 0)
                error = -zfs_sa_set_xattr(zp);
 
+       if (error) {
+               nvlist_free(nvl);
+               zp->z_xattr_cached = NULL;
+       }
+
        ASSERT3S(error, <=, 0);
 
        return (error);
@@ -494,6 +579,7 @@ zpl_xattr_set(struct inode *ip, const char *name, const void *value,
        zfs_sb_t *zsb = ZTOZSB(zp);
        cred_t *cr = CRED();
        fstrans_cookie_t cookie;
+       int where;
        int error;
 
        crhold(cr);
@@ -507,12 +593,14 @@ zpl_xattr_set(struct inode *ip, const char *name, const void *value,
         *
         *   XATTR_CREATE: fail if xattr already exists
         *   XATTR_REPLACE: fail if xattr does not exist
+        *
+        * We also want to know if it resides in sa or dir, so we can make
+        * sure we don't end up with duplicate in both places.
         */
-       error = __zpl_xattr_get(ip, name, NULL, 0, cr);
+       error = __zpl_xattr_where(ip, name, &where, cr);
        if (error < 0) {
                if (error != -ENODATA)
                        goto out;
-
                if (flags & XATTR_REPLACE)
                        goto out;
 
@@ -527,13 +615,26 @@ zpl_xattr_set(struct inode *ip, const char *name, const void *value,
        }
 
        /* Preferentially store the xattr as a SA for better performance */
-       if (zsb->z_use_sa && zsb->z_xattr_sa && zp->z_is_sa) {
+       if (zsb->z_use_sa && zp->z_is_sa &&
+           (zsb->z_xattr_sa || (value == NULL && where & XATTR_IN_SA))) {
                error = zpl_xattr_set_sa(ip, name, value, size, flags, cr);
-               if (error == 0)
+               if (error == 0) {
+                       /*
+                        * Successfully put into SA, we need to clear the one
+                        * in dir.
+                        */
+                       if (where & XATTR_IN_DIR)
+                               zpl_xattr_set_dir(ip, name, NULL, 0, 0, cr);
                        goto out;
+               }
        }
 
        error = zpl_xattr_set_dir(ip, name, value, size, flags, cr);
+       /*
+        * Successfully put into dir, we need to clear the one in SA.
+        */
+       if (error == 0 && (where & XATTR_IN_SA))
+               zpl_xattr_set_sa(ip, name, NULL, 0, 0, cr);
 out:
        rw_exit(&ITOZ(ip)->z_xattr_lock);
        rrm_exit(&(zsb)->z_teardown_lock, FTAG);
@@ -544,6 +645,43 @@ out:
        return (error);
 }
 
+/*
+ * Extended user attributes
+ *
+ * "Extended user attributes may be assigned to files and directories for
+ * storing arbitrary additional information such as the mime type,
+ * character set or encoding of a file.  The access permissions for user
+ * attributes are defined by the file permission bits: read permission
+ * is required to retrieve the attribute value, and writer permission is
+ * required to change it.
+ *
+ * The file permission bits of regular files and directories are
+ * interpreted differently from the file permission bits of special
+ * files and symbolic links.  For regular files and directories the file
+ * permission bits define access to the file's contents, while for
+ * device special files they define access to the device described by
+ * the special file.  The file permissions of symbolic links are not
+ * used in access checks.  These differences would allow users to
+ * consume filesystem resources in a way not controllable by disk quotas
+ * for group or world writable special files and directories.
+ *
+ * For this reason, extended user attributes are allowed only for
+ * regular files and directories, and access to extended user attributes
+ * is restricted to the owner and to users with appropriate capabilities
+ * for directories with the sticky bit set (see the chmod(1) manual page
+ * for an explanation of the sticky bit)." - xattr(7)
+ *
+ * ZFS allows extended user attributes to be disabled administratively
+ * by setting the 'xattr=off' property on the dataset.
+ */
+static int
+__zpl_xattr_user_list(struct inode *ip, char *list, size_t list_size,
+    const char *name, size_t name_len)
+{
+       return (ITOZSB(ip)->z_flags & ZSB_XATTR);
+}
+ZPL_XATTR_LIST_WRAPPER(zpl_xattr_user_list);
+
 static int
 __zpl_xattr_user_get(struct inode *ip, const char *name,
     void *value, size_t size)
@@ -586,12 +724,31 @@ __zpl_xattr_user_set(struct inode *ip, const char *name,
 }
 ZPL_XATTR_SET_WRAPPER(zpl_xattr_user_set);
 
-xattr_handler_t zpl_xattr_user_handler = {
+xattr_handler_t zpl_xattr_user_handler =
+{
        .prefix = XATTR_USER_PREFIX,
+       .list   = zpl_xattr_user_list,
        .get    = zpl_xattr_user_get,
        .set    = zpl_xattr_user_set,
 };
 
+/*
+ * Trusted extended attributes
+ *
+ * "Trusted extended attributes are visible and accessible only to
+ * processes that have the CAP_SYS_ADMIN capability.  Attributes in this
+ * class are used to implement mechanisms in user space (i.e., outside
+ * the kernel) which keep information in extended attributes to which
+ * ordinary processes should not have access." - xattr(7)
+ */
+static int
+__zpl_xattr_trusted_list(struct inode *ip, char *list, size_t list_size,
+    const char *name, size_t name_len)
+{
+       return (capable(CAP_SYS_ADMIN));
+}
+ZPL_XATTR_LIST_WRAPPER(zpl_xattr_trusted_list);
+
 static int
 __zpl_xattr_trusted_get(struct inode *ip, const char *name,
     void *value, size_t size)
@@ -634,12 +791,34 @@ __zpl_xattr_trusted_set(struct inode *ip, const char *name,
 }
 ZPL_XATTR_SET_WRAPPER(zpl_xattr_trusted_set);
 
-xattr_handler_t zpl_xattr_trusted_handler = {
+xattr_handler_t zpl_xattr_trusted_handler =
+{
        .prefix = XATTR_TRUSTED_PREFIX,
+       .list   = zpl_xattr_trusted_list,
        .get    = zpl_xattr_trusted_get,
        .set    = zpl_xattr_trusted_set,
 };
 
+/*
+ * Extended security attributes
+ *
+ * "The security attribute namespace is used by kernel security modules,
+ * such as Security Enhanced Linux, and also to implement file
+ * capabilities (see capabilities(7)).  Read and write access
+ * permissions to security attributes depend on the policy implemented
+ * for each security attribute by the security module.  When no security
+ * module is loaded, all processes have read access to extended security
+ * attributes, and write access is limited to processes that have the
+ * CAP_SYS_ADMIN capability." - xattr(7)
+ */
+static int
+__zpl_xattr_security_list(struct inode *ip, char *list, size_t list_size,
+    const char *name, size_t name_len)
+{
+       return (1);
+}
+ZPL_XATTR_LIST_WRAPPER(zpl_xattr_security_list);
+
 static int
 __zpl_xattr_security_get(struct inode *ip, const char *name,
     void *value, size_t size)
@@ -731,14 +910,25 @@ zpl_xattr_security_init(struct inode *ip, struct inode *dip,
 }
 #endif /* HAVE_CALLBACK_SECURITY_INODE_INIT_SECURITY */
 
+/*
+ * Security xattr namespace handlers.
+ */
 xattr_handler_t zpl_xattr_security_handler = {
        .prefix = XATTR_SECURITY_PREFIX,
+       .list   = zpl_xattr_security_list,
        .get    = zpl_xattr_security_get,
        .set    = zpl_xattr_security_set,
 };
 
+/*
+ * Extended system attributes
+ *
+ * "Extended system attributes are used by the kernel to store system
+ * objects such as Access Control Lists.  Read and write access permissions
+ * to system attributes depend on the policy implemented for each system
+ * attribute implemented by filesystems in the kernel." - xattr(7)
+ */
 #ifdef CONFIG_FS_POSIX_ACL
-
 int
 zpl_set_acl(struct inode *ip, int type, struct posix_acl *acl)
 {
@@ -752,7 +942,7 @@ zpl_set_acl(struct inode *ip, int type, struct posix_acl *acl)
 
        switch (type) {
        case ACL_TYPE_ACCESS:
-               name = POSIX_ACL_XATTR_ACCESS;
+               name = XATTR_NAME_POSIX_ACL_ACCESS;
                if (acl) {
                        zpl_equivmode_t mode = ip->i_mode;
                        error = posix_acl_equiv_mode(acl, &mode);
@@ -779,7 +969,7 @@ zpl_set_acl(struct inode *ip, int type, struct posix_acl *acl)
                break;
 
        case ACL_TYPE_DEFAULT:
-               name = POSIX_ACL_XATTR_DEFAULT;
+               name = XATTR_NAME_POSIX_ACL_ACCESS;
                if (!S_ISDIR(ip->i_mode))
                        return (acl ? -EACCES : 0);
                break;
@@ -829,10 +1019,10 @@ zpl_get_acl(struct inode *ip, int type)
 
        switch (type) {
        case ACL_TYPE_ACCESS:
-               name = POSIX_ACL_XATTR_ACCESS;
+               name = XATTR_NAME_POSIX_ACL_ACCESS;
                break;
        case ACL_TYPE_DEFAULT:
-               name = POSIX_ACL_XATTR_DEFAULT;
+               name = XATTR_NAME_POSIX_ACL_DEFAULT;
                break;
        default:
                return (ERR_PTR(-EINVAL));
@@ -981,101 +1171,46 @@ zpl_chmod_acl(struct inode *ip)
        return (error);
 }
 
-static size_t
-zpl_xattr_acl_list(struct inode *ip, char *list, size_t list_size,
-    const char *name, size_t name_len, int type)
+static int
+__zpl_xattr_acl_list_access(struct inode *ip, char *list, size_t list_size,
+    const char *name, size_t name_len)
 {
-       char *xattr_name;
-       size_t xattr_size;
+       char *xattr_name = XATTR_NAME_POSIX_ACL_ACCESS;
+       size_t xattr_size = sizeof (XATTR_NAME_POSIX_ACL_ACCESS);
 
        if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIXACL)
                return (0);
 
-       switch (type) {
-       case ACL_TYPE_ACCESS:
-               xattr_name = POSIX_ACL_XATTR_ACCESS;
-               xattr_size = sizeof (xattr_name);
-               break;
-       case ACL_TYPE_DEFAULT:
-               xattr_name = POSIX_ACL_XATTR_DEFAULT;
-               xattr_size = sizeof (xattr_name);
-               break;
-       default:
-               return (0);
-       }
-
        if (list && xattr_size <= list_size)
                memcpy(list, xattr_name, xattr_size);
 
        return (xattr_size);
 }
+ZPL_XATTR_LIST_WRAPPER(zpl_xattr_acl_list_access);
 
-#ifdef HAVE_DENTRY_XATTR_LIST
-static size_t
-zpl_xattr_acl_list_access(struct dentry *dentry, char *list,
-    size_t list_size, const char *name, size_t name_len, int type)
-{
-       ASSERT3S(type, ==, ACL_TYPE_ACCESS);
-       return zpl_xattr_acl_list(dentry->d_inode,
-           list, list_size, name, name_len, type);
-}
-
-static size_t
-zpl_xattr_acl_list_default(struct dentry *dentry, char *list,
-    size_t list_size, const char *name, size_t name_len, int type)
-{
-       ASSERT3S(type, ==, ACL_TYPE_DEFAULT);
-       return zpl_xattr_acl_list(dentry->d_inode,
-           list, list_size, name, name_len, type);
-}
-
-#elif defined(HAVE_HANDLER_XATTR_LIST)
-static size_t
-zpl_xattr_acl_list_access(const struct xattr_handler *handler,
-    struct dentry *dentry, char *list, size_t list_size, const char *name,
-    size_t name_len)
-{
-       int type = handler->flags;
-       ASSERT3S(type, ==, ACL_TYPE_ACCESS);
-       return zpl_xattr_acl_list(dentry->d_inode,
-           list, list_size, name, name_len, type);
-}
-
-static size_t
-zpl_xattr_acl_list_default(const struct xattr_handler *handler,
-    struct dentry *dentry, char *list, size_t list_size, const char *name,
-    size_t name_len)
+static int
+__zpl_xattr_acl_list_default(struct inode *ip, char *list, size_t list_size,
+    const char *name, size_t name_len)
 {
-       int type = handler->flags;
-       ASSERT3S(type, ==, ACL_TYPE_DEFAULT);
-       return zpl_xattr_acl_list(dentry->d_inode,
-           list, list_size, name, name_len, type);
-}
+       char *xattr_name = XATTR_NAME_POSIX_ACL_DEFAULT;
+       size_t xattr_size = sizeof (XATTR_NAME_POSIX_ACL_DEFAULT);
 
-#else
+       if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIXACL)
+               return (0);
 
-static size_t
-zpl_xattr_acl_list_access(struct inode *ip, char *list, size_t list_size,
-    const char *name, size_t name_len)
-{
-       return zpl_xattr_acl_list(ip,
-           list, list_size, name, name_len, ACL_TYPE_ACCESS);
-}
+       if (list && xattr_size <= list_size)
+               memcpy(list, xattr_name, xattr_size);
 
-static size_t
-zpl_xattr_acl_list_default(struct inode *ip, char *list, size_t list_size,
-    const char *name, size_t name_len)
-{
-       return zpl_xattr_acl_list(ip,
-           list, list_size, name, name_len, ACL_TYPE_DEFAULT);
+       return (xattr_size);
 }
-#endif /* HAVE_DENTRY_XATTR_LIST */
+ZPL_XATTR_LIST_WRAPPER(zpl_xattr_acl_list_default);
 
 static int
-zpl_xattr_acl_get(struct inode *ip, const char *name,
-    void *buffer, size_t size, int type)
+__zpl_xattr_acl_get_access(struct inode *ip, const char *name,
+    void *buffer, size_t size)
 {
        struct posix_acl *acl;
+       int type = ACL_TYPE_ACCESS;
        int error;
 
        if (strcmp(name, "") != 0)
@@ -1095,65 +1230,41 @@ zpl_xattr_acl_get(struct inode *ip, const char *name,
 
        return (error);
 }
-
-#ifdef HAVE_DENTRY_XATTR_GET
-static int
-zpl_xattr_acl_get_access(struct dentry *dentry, const char *name,
-    void *buffer, size_t size, int type)
-{
-       ASSERT3S(type, ==, ACL_TYPE_ACCESS);
-       return (zpl_xattr_acl_get(dentry->d_inode, name, buffer, size, type));
-}
+ZPL_XATTR_GET_WRAPPER(zpl_xattr_acl_get_access);
 
 static int
-zpl_xattr_acl_get_default(struct dentry *dentry, const char *name,
-    void *buffer, size_t size, int type)
+__zpl_xattr_acl_get_default(struct inode *ip, const char *name,
+    void *buffer, size_t size)
 {
-       ASSERT3S(type, ==, ACL_TYPE_DEFAULT);
-       return (zpl_xattr_acl_get(dentry->d_inode, name, buffer, size, type));
-}
+       struct posix_acl *acl;
+       int type = ACL_TYPE_DEFAULT;
+       int error;
 
-#elif defined(HAVE_HANDLER_XATTR_GET)
-static int
-zpl_xattr_acl_get_access(const struct xattr_handler *handler,
-    struct dentry *dentry, const char *name, void *buffer, size_t size)
-{
-       int type = handler->flags;
-       ASSERT3S(type, ==, ACL_TYPE_ACCESS);
-       return (zpl_xattr_acl_get(dentry->d_inode, name, buffer, size, type));
-}
+       if (strcmp(name, "") != 0)
+               return (-EINVAL);
 
-static int
-zpl_xattr_acl_get_default(const struct xattr_handler *handler,
-    struct dentry *dentry, const char *name, void *buffer, size_t size)
-{
-       int type = handler->flags;
-       ASSERT3S(type, ==, ACL_TYPE_DEFAULT);
-       return (zpl_xattr_acl_get(dentry->d_inode, name, buffer, size, type));
-}
+       if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIXACL)
+               return (-EOPNOTSUPP);
 
-#else
+       acl = zpl_get_acl(ip, type);
+       if (IS_ERR(acl))
+               return (PTR_ERR(acl));
+       if (acl == NULL)
+               return (-ENODATA);
 
-static int
-zpl_xattr_acl_get_access(struct inode *ip, const char *name,
-    void *buffer, size_t size)
-{
-       return (zpl_xattr_acl_get(ip, name, buffer, size, ACL_TYPE_ACCESS));
-}
+       error = zpl_acl_to_xattr(acl, buffer, size);
+       zpl_posix_acl_release(acl);
 
-static int
-zpl_xattr_acl_get_default(struct inode *ip, const char *name,
-    void *buffer, size_t size)
-{
-       return (zpl_xattr_acl_get(ip, name, buffer, size, ACL_TYPE_DEFAULT));
+       return (error);
 }
-#endif /* HAVE_DENTRY_XATTR_GET */
+ZPL_XATTR_GET_WRAPPER(zpl_xattr_acl_get_default);
 
 static int
-zpl_xattr_acl_set(struct inode *ip, const char *name,
-    const void *value, size_t size, int flags, int type)
+__zpl_xattr_acl_set_access(struct inode *ip, const char *name,
+    const void *value, size_t size, int flags)
 {
        struct posix_acl *acl;
+       int type = ACL_TYPE_ACCESS;
        int error = 0;
 
        if (strcmp(name, "") != 0)
@@ -1185,88 +1296,77 @@ zpl_xattr_acl_set(struct inode *ip, const char *name,
 
        return (error);
 }
+ZPL_XATTR_SET_WRAPPER(zpl_xattr_acl_set_access);
 
-#ifdef HAVE_DENTRY_XATTR_SET
 static int
-zpl_xattr_acl_set_access(struct dentry *dentry, const char *name,
-    const void *value, size_t size, int flags, int type)
+__zpl_xattr_acl_set_default(struct inode *ip, const char *name,
+    const void *value, size_t size, int flags)
 {
-       ASSERT3S(type, ==, ACL_TYPE_ACCESS);
-       return (zpl_xattr_acl_set(dentry->d_inode,
-           name, value, size, flags, type));
-}
+       struct posix_acl *acl;
+       int type = ACL_TYPE_DEFAULT;
+       int error = 0;
 
-static int
-zpl_xattr_acl_set_default(struct dentry *dentry, const char *name,
-    const void *value, size_t size, int flags, int type)
-{
-       ASSERT3S(type, ==, ACL_TYPE_DEFAULT);
-       return zpl_xattr_acl_set(dentry->d_inode,
-           name, value, size, flags, type);
-}
+       if (strcmp(name, "") != 0)
+               return (-EINVAL);
 
-#elif defined(HAVE_HANDLER_XATTR_SET)
-static int
-zpl_xattr_acl_set_access(const struct xattr_handler *handler,
-    struct dentry *dentry, const char *name, const void *value, size_t size,
-    int flags)
-{
-       int type = handler->flags;
-       ASSERT3S(type, ==, ACL_TYPE_ACCESS);
-       return (zpl_xattr_acl_set(dentry->d_inode,
-           name, value, size, flags, type));
-}
+       if (ITOZSB(ip)->z_acl_type != ZFS_ACLTYPE_POSIXACL)
+               return (-EOPNOTSUPP);
 
-static int
-zpl_xattr_acl_set_default(const struct xattr_handler *handler,
-    struct dentry *dentry, const char *name, const void *value, size_t size,
-    int flags)
-{
-       int type = handler->flags;
-       ASSERT3S(type, ==, ACL_TYPE_DEFAULT);
-       return zpl_xattr_acl_set(dentry->d_inode,
-           name, value, size, flags, type);
-}
+       if (!zpl_inode_owner_or_capable(ip))
+               return (-EPERM);
 
-#else
+       if (value) {
+               acl = zpl_acl_from_xattr(value, size);
+               if (IS_ERR(acl))
+                       return (PTR_ERR(acl));
+               else if (acl) {
+                       error = posix_acl_valid(acl);
+                       if (error) {
+                               zpl_posix_acl_release(acl);
+                               return (error);
+                       }
+               }
+       } else {
+               acl = NULL;
+       }
 
-static int
-zpl_xattr_acl_set_access(struct inode *ip, const char *name,
-    const void *value, size_t size, int flags)
-{
-       return zpl_xattr_acl_set(ip,
-           name, value, size, flags, ACL_TYPE_ACCESS);
-}
+       error = zpl_set_acl(ip, type, acl);
+       zpl_posix_acl_release(acl);
 
-static int
-zpl_xattr_acl_set_default(struct inode *ip, const char *name,
-    const void *value, size_t size, int flags)
-{
-       return zpl_xattr_acl_set(ip,
-           name, value, size, flags, ACL_TYPE_DEFAULT);
+       return (error);
 }
-#endif /* HAVE_DENTRY_XATTR_SET */
+ZPL_XATTR_SET_WRAPPER(zpl_xattr_acl_set_default);
 
-struct xattr_handler zpl_xattr_acl_access_handler =
+/*
+ * ACL access xattr namespace handlers.
+ */
+xattr_handler_t zpl_xattr_acl_access_handler =
 {
-       .prefix = POSIX_ACL_XATTR_ACCESS,
+       .prefix = XATTR_NAME_POSIX_ACL_ACCESS,
        .list   = zpl_xattr_acl_list_access,
        .get    = zpl_xattr_acl_get_access,
        .set    = zpl_xattr_acl_set_access,
-#if defined(HAVE_DENTRY_XATTR_LIST) || defined(HAVE_HANDLER_XATTR_LIST)
+#if defined(HAVE_XATTR_LIST_SIMPLE) || \
+    defined(HAVE_XATTR_LIST_DENTRY) || \
+    defined(HAVE_XATTR_LIST_HANDLER)
        .flags  = ACL_TYPE_ACCESS,
-#endif /* HAVE_DENTRY_XATTR_LIST */
+#endif
 };
 
-struct xattr_handler zpl_xattr_acl_default_handler =
+/*
+ * ACL default xattr namespace handlers.
+ */
+xattr_handler_t zpl_xattr_acl_default_handler =
 {
-       .prefix = POSIX_ACL_XATTR_DEFAULT,
+       .prefix = XATTR_NAME_POSIX_ACL_DEFAULT,
        .list   = zpl_xattr_acl_list_default,
        .get    = zpl_xattr_acl_get_default,
        .set    = zpl_xattr_acl_set_default,
-#if defined(HAVE_DENTRY_XATTR_LIST) || defined(HAVE_HANDLER_XATTR_LIST)
+#if defined(HAVE_XATTR_LIST_SIMPLE) || \
+    defined(HAVE_XATTR_LIST_DENTRY) || \
+    defined(HAVE_XATTR_LIST_HANDLER)
        .flags  = ACL_TYPE_DEFAULT,
-#endif /* HAVE_DENTRY_XATTR_LIST */
+#endif
 };
 
 #endif /* CONFIG_FS_POSIX_ACL */
@@ -1281,3 +1381,31 @@ xattr_handler_t *zpl_xattr_handlers[] = {
 #endif /* CONFIG_FS_POSIX_ACL */
        NULL
 };
+
+static const struct xattr_handler *
+zpl_xattr_handler(const char *name)
+{
+       if (strncmp(name, XATTR_USER_PREFIX,
+           XATTR_USER_PREFIX_LEN) == 0)
+               return (&zpl_xattr_user_handler);
+
+       if (strncmp(name, XATTR_TRUSTED_PREFIX,
+           XATTR_TRUSTED_PREFIX_LEN) == 0)
+               return (&zpl_xattr_trusted_handler);
+
+       if (strncmp(name, XATTR_SECURITY_PREFIX,
+           XATTR_SECURITY_PREFIX_LEN) == 0)
+               return (&zpl_xattr_security_handler);
+
+#ifdef CONFIG_FS_POSIX_ACL
+       if (strncmp(name, XATTR_NAME_POSIX_ACL_ACCESS,
+           sizeof (XATTR_NAME_POSIX_ACL_ACCESS)) == 0)
+               return (&zpl_xattr_acl_access_handler);
+
+       if (strncmp(name, XATTR_NAME_POSIX_ACL_DEFAULT,
+           sizeof (XATTR_NAME_POSIX_ACL_DEFAULT)) == 0)
+               return (&zpl_xattr_acl_default_handler);
+#endif /* CONFIG_FS_POSIX_ACL */
+
+       return (NULL);
+}
index 955c7fc281567033744c385cab392fd9c20abaa5..978867460f66570bd1a43286a8cb717712394629 100644 (file)
@@ -75,11 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 7d99954bd2be2df6a77cd0007f38c21f7c72b020..74305ec83dfec68fd07a92bf5c2b3cdeeecf1300 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index f314d9a4151370be17fa59626935949df204b133..48d9f4ff62cad6bde7317b410be3f185e7ed2f45 100644 (file)
@@ -177,6 +177,7 @@ for kernel_version in %{?kernel_versions}; do
         INSTALL_MOD_DIR=%{kmodinstdir_postfix}
     cd ..
 done
+# find-debuginfo.sh only considers executables
 chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
 %{?akmod_install}
 
@@ -185,6 +186,15 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Wed Mar 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.5-1
+- Linux 4.5 compatibility zfsonlinux/zfs#4228
+- Create working debuginfo packages on Red Hat zfsonlinux/zfs#4224
+- Make arc_summary.py and dbufstat.py compatible with python3
+- musl libc compatibility for option parsing zfsonlinux/zfs#4222
+- Prevent arc_c collapse and possible panic zfsonlinux/zfs#3904
+- Prevent duplicated xattr between SA and dir zfsonlinux/zfs#4153
+- Fix zsb->z_hold_mtx deadlock zfsonlinux/zfs#4106
+- Prevent SA header corruption zfsonlinux/zfs#4150
 * Fri Jan  8 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.4-1
 - Linux 4.4 compat
 - Assorted stability fixes
index c7010c2f709dfb6812971ff467d492f7b023795d..41419e6d60977f05ee22ce9c08b7230fb3536a80 100644 (file)
@@ -332,6 +332,15 @@ exit 0
 %endif
 
 %changelog
+* Wed Mar 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.5-1
+- Linux 4.5 compatibility zfsonlinux/zfs#4228
+- Create working debuginfo packages on Red Hat zfsonlinux/zfs#4224
+- Make arc_summary.py and dbufstat.py compatible with python3
+- musl libc compatibility for option parsing zfsonlinux/zfs#4222
+- Prevent arc_c collapse and possible panic zfsonlinux/zfs#3904
+- Prevent duplicated xattr between SA and dir zfsonlinux/zfs#4153
+- Fix zsb->z_hold_mtx deadlock zfsonlinux/zfs#4106
+- Prevent SA header corruption zfsonlinux/zfs#4150
 * Fri Jan  8 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.4-1
 - Linux 4.4 compat
 - Assorted stability fixes
index 7ac7f550890c5a5adc3f404d0bffeb367f69d330..55f2da6ff671ca439a3a1fe6a72d3f1412878c73 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index ecc809bc6520fae762cadcfe89de2d2ce9ca86ec..fa0c1108e08977f6460574a352d676b62266c9e0 100644 (file)
@@ -25,7 +25,6 @@ Conflicts:      @PACKAGE@-dkms\n\n" > %{_sourcedir}/kmod-preamble)
 This package contains the ZFS kernel modules.
 
 %define kmod_name @PACKAGE@
-%define debug_package %{nil}
 
 %kernel_module_package -n %{kmod_name} -p %{_sourcedir}/kmod-preamble
 
@@ -79,6 +78,9 @@ make install \
         INSTALL_MOD_DIR=extra/%{kmod_name}
 %{__rm} -f %{buildroot}/lib/modules/%{kverrel}/modules.*
 
+# find-debuginfo.sh only considers executables
+%{__chmod} u+x  %{buildroot}/lib/modules/%{kverrel}/extra/*/*/*
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
index c7010c2f709dfb6812971ff467d492f7b023795d..41419e6d60977f05ee22ce9c08b7230fb3536a80 100644 (file)
@@ -332,6 +332,15 @@ exit 0
 %endif
 
 %changelog
+* Wed Mar 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.5-1
+- Linux 4.5 compatibility zfsonlinux/zfs#4228
+- Create working debuginfo packages on Red Hat zfsonlinux/zfs#4224
+- Make arc_summary.py and dbufstat.py compatible with python3
+- musl libc compatibility for option parsing zfsonlinux/zfs#4222
+- Prevent arc_c collapse and possible panic zfsonlinux/zfs#3904
+- Prevent duplicated xattr between SA and dir zfsonlinux/zfs#4153
+- Fix zsb->z_hold_mtx deadlock zfsonlinux/zfs#4106
+- Prevent SA header corruption zfsonlinux/zfs#4150
 * Fri Jan  8 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.4-1
 - Linux 4.4 compat
 - Assorted stability fixes
index 1ecf47dc88fa115a6648d25639526ef079552f71..be71b304c61deb94e53df29ea7b3193f52e7a29b 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index c57929da2fd4c12e31d1c2b0ba5549d65933351e..ed6641a0d4477ba3cc127994dafbc8173521dccc 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index dc852497da30d51046f860b8566addfb786a857e..d9a0662a3ca9a34b3c203f9aba85738e27deaf0b 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index 22eae8b0264847075b251691b7baa9989657b0e5..b460c81917ec1b2ad5327e87ccc1d5476d06f87d 100644 (file)
@@ -77,11 +77,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -94,7 +94,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index b1f18405f219a711a8a315434223652bf6505787..bdb9d7d390603e6006f479c45859ccd0c66596fc 100644 (file)
@@ -75,11 +75,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -92,7 +92,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index a8b8a670fafc67f923c3322f33a81a5e2d7d21ea..52374a58d199395bb2942d0a327c57c065447581 100644 (file)
@@ -76,11 +76,11 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-file-inode.m4 \
        $(top_srcdir)/config/kernel-fmode-t.m4 \
        $(top_srcdir)/config/kernel-follow-down-one.m4 \
-       $(top_srcdir)/config/kernel-follow-link-nameidata.m4 \
        $(top_srcdir)/config/kernel-fsync.m4 \
        $(top_srcdir)/config/kernel-generic_io_acct.m4 \
        $(top_srcdir)/config/kernel-get-disk-ro.m4 \
        $(top_srcdir)/config/kernel-get-gendisk.m4 \
+       $(top_srcdir)/config/kernel-get-link.m4 \
        $(top_srcdir)/config/kernel-insert-inode-locked.m4 \
        $(top_srcdir)/config/kernel-invalidate-bdev-args.m4 \
        $(top_srcdir)/config/kernel-is_owner_or_cap.m4 \
@@ -93,7 +93,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-mkdir-umode-t.m4 \
        $(top_srcdir)/config/kernel-mount-nodev.m4 \
        $(top_srcdir)/config/kernel-open-bdev-exclusive.m4 \
-       $(top_srcdir)/config/kernel-put-link-nameidata.m4 \
+       $(top_srcdir)/config/kernel-put-link.m4 \
        $(top_srcdir)/config/kernel-security-inode-init.m4 \
        $(top_srcdir)/config/kernel-set-nlink.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
index fd7927464240e6b3b2cc02eccc390cbeae8d537b..0fd47c34db91129a68cc40f7188c6bc53aa66653 100644 (file)
@@ -90,7 +90,7 @@
 /* dentry uses const struct dentry_operations */
 #undef HAVE_CONST_DENTRY_OPERATIONS
 
-/* super_block uses const struct xattr_hander */
+/* super_block uses const struct xattr_handler */
 #undef HAVE_CONST_XATTR_HANDLER
 
 /* iops->create() passes nameidata */
 /* DECLARE_EVENT_CLASS() is available */
 #undef HAVE_DECLARE_EVENT_CLASS
 
-/* xattr_handler->get() wants dentry */
-#undef HAVE_DENTRY_XATTR_GET
-
-/* xattr_handler->list() wants dentry */
-#undef HAVE_DENTRY_XATTR_LIST
-
-/* xattr_handler->set() wants dentry */
-#undef HAVE_DENTRY_XATTR_SET
-
 /* sops->dirty_inode() wants flags */
 #undef HAVE_DIRTY_INODE_WITH_FLAGS
 
 /* follow_down_one() is available */
 #undef HAVE_FOLLOW_DOWN_ONE
 
+/* iops->follow_link() cookie */
+#undef HAVE_FOLLOW_LINK_COOKIE
+
 /* iops->follow_link() nameidata */
 #undef HAVE_FOLLOW_LINK_NAMEIDATA
 
 /* get_gendisk() is available */
 #undef HAVE_GET_GENDISK
 
-/* xattr_handler->get() wants xattr_handler */
-#undef HAVE_HANDLER_XATTR_GET
+/* iops->get_link() cookie */
+#undef HAVE_GET_LINK_COOKIE
 
-/* xattr_handler->list() wants xattr_handler */
-#undef HAVE_HANDLER_XATTR_LIST
-
-/* xattr_handler->set() wants xattr_handler */
-#undef HAVE_HANDLER_XATTR_SET
+/* iops->get_link() delayed */
+#undef HAVE_GET_LINK_DELAYED
 
 /* fops->fallocate() exists */
 #undef HAVE_INODE_FALLOCATE
 /* posix_acl_release() is GPL-only */
 #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY
 
+/* iops->put_link() cookie */
+#undef HAVE_PUT_LINK_COOKIE
+
+/* iops->put_link() delayed */
+#undef HAVE_PUT_LINK_DELAYED
+
 /* iops->put_link() nameidata */
 #undef HAVE_PUT_LINK_NAMEIDATA
 
 /* fops->read/write_iter() are available */
 #undef HAVE_VFS_RW_ITERATE
 
+/* xattr_handler->get() wants dentry */
+#undef HAVE_XATTR_GET_DENTRY
+
+/* xattr_handler->get() wants xattr_handler */
+#undef HAVE_XATTR_GET_HANDLER
+
+/* xattr_handler->get() wants inode */
+#undef HAVE_XATTR_GET_INODE
+
+/* xattr_handler->list() wants dentry */
+#undef HAVE_XATTR_LIST_DENTRY
+
+/* xattr_handler->list() wants xattr_handler */
+#undef HAVE_XATTR_LIST_HANDLER
+
+/* xattr_handler->list() wants inode */
+#undef HAVE_XATTR_LIST_INODE
+
+/* xattr_handler->list() wants simple */
+#undef HAVE_XATTR_LIST_SIMPLE
+
+/* xattr_handler->set() wants dentry */
+#undef HAVE_XATTR_SET_DENTRY
+
+/* xattr_handler->set() wants xattr_handler */
+#undef HAVE_XATTR_SET_HANDLER
+
+/* xattr_handler->set() wants inode */
+#undef HAVE_XATTR_SET_INODE
+
 /* Define if you have zlib */
 #undef HAVE_ZLIB