]> git.proxmox.com Git - mirror_zfs-debian.git/commitdiff
Merge tag 'upstream/0.6.5.8'
authorAron Xu <aron@debian.org>
Mon, 19 Sep 2016 20:14:07 +0000 (04:14 +0800)
committerAron Xu <aron@debian.org>
Mon, 19 Sep 2016 20:14:07 +0000 (04:14 +0800)
Upstream version 0.6.5.8

146 files changed:
META
Makefile.am
Makefile.in
aclocal.m4
cmd/Makefile.in
cmd/arc_summary/Makefile.in
cmd/arcstat/Makefile.in
cmd/dbufstat/Makefile.in
cmd/fsck_zfs/Makefile.in
cmd/mount_zfs/Makefile.in
cmd/vdev_id/Makefile.in
cmd/zdb/Makefile.in
cmd/zdb/zdb.c
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-acl.m4
config/kernel-bio-op.m4 [new file with mode: 0644]
config/kernel-blk-queue-flush.m4
config/kernel-submit_bio.m4 [new file with mode: 0644]
config/kernel-vfs-iterate.m4
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/modules-load.d/zfs.conf.in
etc/systemd/Makefile.in
etc/systemd/system/50-zfs.preset.in
etc/systemd/system/Makefile.am
etc/systemd/system/Makefile.in
etc/systemd/system/zed.service.in [deleted file]
etc/systemd/system/zfs-import-cache.service.in
etc/systemd/system/zfs-import-scan.service.in
etc/systemd/system/zfs-mount.service.in
etc/systemd/system/zfs-share.service.in
etc/systemd/system/zfs-zed.service.in [new file with mode: 0644]
etc/systemd/system/zfs.target.in
etc/zfs/Makefile.in
include/Makefile.in
include/linux/Makefile.in
include/linux/blkdev_compat.h
include/linux/vfs_compat.h
include/linux/xattr_compat.h
include/sys/Makefile.in
include/sys/dsl_dataset.h
include/sys/fm/Makefile.in
include/sys/fm/fs/Makefile.in
include/sys/fs/Makefile.in
include/sys/fs/zfs.h
include/sys/spa.h
include/sys/trace_acl.h
include/sys/vdev_disk.h
include/sys/zfs_rlock.h
include/sys/zfs_znode.h
include/sys/zpl.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/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_dataset.c
lib/libzfs/libzfs_import.c
lib/libzfs/libzfs_mount.c
lib/libzfs/libzfs_pool.c
lib/libzfs/libzfs_util.c [changed mode: 0644->0755]
lib/libzfs_core/Makefile.in
lib/libzpool/Makefile.in
man/Makefile.in
man/man1/Makefile.in
man/man5/Makefile.in
man/man5/zfs-module-parameters.5
man/man8/Makefile.in
module/avl/zavl.mod.c [deleted file]
module/nvpair/nvpair.c
module/nvpair/znvpair.mod.c [deleted file]
module/unicode/zunicode.mod.c [deleted file]
module/zcommon/zcommon.mod.c [deleted file]
module/zfs/arc.c
module/zfs/dbuf.c
module/zfs/dbuf_stats.c
module/zfs/dmu_traverse.c
module/zfs/dsl_dataset.c
module/zfs/dsl_pool.c [changed mode: 0644->0755]
module/zfs/spa.c
module/zfs/spa_config.c
module/zfs/vdev.c
module/zfs/vdev_disk.c
module/zfs/vdev_queue.c
module/zfs/zfs.mod.c [deleted file]
module/zfs/zfs_acl.c
module/zfs/zfs_ctldir.c
module/zfs/zfs_dir.c
module/zfs/zfs_ioctl.c
module/zfs/zfs_rlock.c
module/zfs/zfs_vfsops.c
module/zfs/zfs_vnops.c
module/zfs/zfs_znode.c
module/zfs/zpl_ctldir.c
module/zfs/zpl_file.c
module/zfs/zpl_super.c
module/zfs/zpl_xattr.c
module/zfs/zvol.c
module/zpios/zpios.mod.c [deleted file]
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.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 f2cc959540646e3a0c71f77414640b6ad9e32830..00be65bedfb9fcde19d8472c7a60bb338a41e180 100644 (file)
--- a/META
+++ b/META
@@ -1,7 +1,7 @@
 Meta:         1
 Name:         zfs
 Branch:       1.0
-Version:      0.6.5.7
+Version:      0.6.5.8
 Release:      1
 Release-Tags: relext
 License:      CDDL
index f8abb5f2c6e52984c211511bc84571450cc7d373..eacc76a8cde32d8e3ef807389c1d1670908c5cd1 100644 (file)
@@ -55,6 +55,13 @@ shellcheck:
                 done; \
         fi
 
+lint: cppcheck
+
+cppcheck:
+       @if type cppcheck > /dev/null 2>&1; then \
+               cppcheck --quiet --force ${top_srcdir}; \
+       fi
+
 ctags:
        $(RM) tags
        find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
index c85d874fdaa01307325b4a66998646c77ef7572b..ee78f9cc772642671889cccc06067e96a1e5af35 100644 (file)
@@ -72,6 +72,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -122,6 +123,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
@@ -1214,6 +1216,13 @@ shellcheck:
                 done; \
         fi
 
+lint: cppcheck
+
+cppcheck:
+       @if type cppcheck > /dev/null 2>&1; then \
+               cppcheck --quiet --force ${top_srcdir}; \
+       fi
+
 ctags:
        $(RM) tags
        find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
index 6e9725724b425689d7be9d610938c43438642af5..602015093b90c2e446e86e4d3faa3cbf3e926f22 100644 (file)
@@ -1099,6 +1099,7 @@ m4_include([config/kernel-bdi-setup-and-register.m4])
 m4_include([config/kernel-bio-bvec-iter.m4])
 m4_include([config/kernel-bio-end-io-t-args.m4])
 m4_include([config/kernel-bio-failfast.m4])
+m4_include([config/kernel-bio-op.m4])
 m4_include([config/kernel-bio-rw-barrier.m4])
 m4_include([config/kernel-bio-rw-discard.m4])
 m4_include([config/kernel-blk-queue-flush.m4])
@@ -1149,6 +1150,7 @@ m4_include([config/kernel-set-nlink.m4])
 m4_include([config/kernel-sget-args.m4])
 m4_include([config/kernel-show-options.m4])
 m4_include([config/kernel-shrink.m4])
+m4_include([config/kernel-submit_bio.m4])
 m4_include([config/kernel-truncate-range.m4])
 m4_include([config/kernel-truncate-setsize.m4])
 m4_include([config/kernel-vfs-iterate.m4])
index 4d9f316af3482375e80e20d6dab40fea2c23339f..f5ed0f575763962f02fba115d60705c843f61350 100644 (file)
@@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 430e21e2a550ad40b50de83c0b2c7175c3689d7a..bb3936a731d91633eda0121618f4f6900285de6d 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index a146a63cc329768fef592afb4af1dc046bb1ceeb..89718f440f58725b0d434a97cd7e75dd9ebb46cd 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index a72144c949c795f7b0437477a971ce7d39dff9a7..7634969735953fcd77886b525401fe221cf85aba 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 8ee90cd6f9469f2fdd876ebbc7f1481cfb6d74af..77a5fc32724bcc1cae16468e323469eb88f46c76 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 282fac7a14fbf77d4304aee4d77e4f7c93511ae3..1db590b7f6cc94c28a2b946f509ec3bfd05c9a6f 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index f1cbea92791b2e7b14877d18e9313f27a9b1e855..351809f3f3ed1b2dd9aecd726502cafbc45e7d0d 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index dba5e3b12ea87142e018adc53388f8a4a09a373e..48d2b620bafc5fb01df82483b1701d009be9c2b4 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 59a0b1b687e2693459cd1d3d654d64bccf31f507..882c6874d4ebb692a815dc93713dc174db2b521a 100644 (file)
        zio_compress_table[(idx)].ci_name : "UNKNOWN")
 #define        ZDB_CHECKSUM_NAME(idx) ((idx) < ZIO_CHECKSUM_FUNCTIONS ?        \
        zio_checksum_table[(idx)].ci_name : "UNKNOWN")
-#define        ZDB_OT_NAME(idx) ((idx) < DMU_OT_NUMTYPES ?     \
-       dmu_ot[(idx)].ot_name : DMU_OT_IS_VALID(idx) ?  \
-       dmu_ot_byteswap[DMU_OT_BYTESWAP(idx)].ob_name : "UNKNOWN")
 #define        ZDB_OT_TYPE(idx) ((idx) < DMU_OT_NUMTYPES ? (idx) :             \
        (((idx) == DMU_OTN_ZAP_DATA || (idx) == DMU_OTN_ZAP_METADATA) ? \
        DMU_OT_ZAP_OTHER : DMU_OT_NUMTYPES))
 
+static char *
+zdb_ot_name(dmu_object_type_t type)
+{
+       if (type < DMU_OT_NUMTYPES)
+               return (dmu_ot[type].ot_name);
+       else if ((type & DMU_OT_NEWTYPE) &&
+               ((type & DMU_OT_BYTESWAP_MASK) < DMU_BSWAP_NUMFUNCS))
+               return (dmu_ot_byteswap[type & DMU_OT_BYTESWAP_MASK].ob_name);
+       else
+               return ("UNKNOWN");
+}
+
 #ifndef lint
 extern int zfs_recover;
 extern uint64_t zfs_arc_max, zfs_arc_meta_limit;
@@ -1925,12 +1934,12 @@ dump_object(objset_t *os, uint64_t object, int verbosity, int *print_header)
 
        (void) printf("%10lld  %3u  %5s  %5s  %5s  %5s  %6s  %s%s\n",
            (u_longlong_t)object, doi.doi_indirection, iblk, dblk,
-           asize, lsize, fill, ZDB_OT_NAME(doi.doi_type), aux);
+           asize, lsize, fill, zdb_ot_name(doi.doi_type), aux);
 
        if (doi.doi_bonus_type != DMU_OT_NONE && verbosity > 3) {
                (void) printf("%10s  %3s  %5s  %5s  %5s  %5s  %6s  %s\n",
                    "", "", "", "", "", bonus_size, "bonus",
-                   ZDB_OT_NAME(doi.doi_bonus_type));
+                   zdb_ot_name(doi.doi_bonus_type));
        }
 
        if (verbosity >= 4) {
index 408cfcf1c59f06c26bc3b5cc6cb4bc11b2eae250..d71afe31dab11809d5b4a11531d7edb764f6afa5 100644 (file)
@@ -54,6 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -104,6 +105,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index bd1cb8823c1aabbd65165a87b555a3f19525b308..b9542a3d7b64b587d9461069beae67702fae5712 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index ffd3cc0b5343164a46539b918d01118cc4d25f9e..71174ae4757bd223c26df4b0aae5f2554e5c8adc 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index efd771770dfba030473e08faafcae5409ccfcd67..1579d83bebaf199852d370047a0e028d951b0f60 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index e9b95018b1c11545c27372a28fe06965390a4b69..ad74505198e640af2b52bdb630d8302ef9d510c3 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 1b221ca7b2cd36b9005b5461d4c9dbc99323d444..e49178606d75e620c44994c8846ffc4905f377d7 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index c2b21965cf433cd1d45266d4311a23cce025fd48..5fc951f1f52cd9bfe40037f284b3effa448a4429 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 42da33b067244bf4370e716ec035edbb0533ac97..a1f55615aa6d530d552ac6f381adc3b2ffb33acf 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index ce8d9522d3471976d0ff1aa78f1cd3b429fee873..7682110dc913ff6d1b7b9c6927e44d599cec8e23 100644 (file)
@@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -101,6 +102,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 1cb28b25a6f4dd58d791073e7ee7c365ced26a88..e6f2bf507ba932a3a679f44a25c4f11e483d4242 100644 (file)
@@ -76,42 +76,45 @@ AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_CHMOD], [
 ])
 
 dnl #
-dnl # 2.6.30 API change,
-dnl # caching of ACL into the inode was added in this version.
+dnl # 3.1 API change,
+dnl # posix_acl_equiv_mode now wants an umode_t* instead of a mode_t*
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_CACHING], [
-       AC_MSG_CHECKING([whether inode has i_acl and i_default_acl])
+AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [
+       AC_MSG_CHECKING([whether posix_acl_equiv_mode() wants umode_t])
        ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
+               #include <linux/posix_acl.h>
        ],[
-               struct inode ino;
-               ino.i_acl = NULL;
-               ino.i_default_acl = NULL;
+               umode_t tmp;
+               posix_acl_equiv_mode(NULL,&tmp);
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_POSIX_ACL_CACHING, 1,
-                   [inode contains i_acl and i_default_acl])
+               AC_DEFINE(HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T, 1,
+                   [ posix_acl_equiv_mode wants umode_t*])
        ],[
                AC_MSG_RESULT(no)
        ])
 ])
 
 dnl #
-dnl # 3.1 API change,
-dnl # posix_acl_equiv_mode now wants an umode_t* instead of a mode_t*
+dnl # 4.8 API change,
+dnl # The function posix_acl_valid now must be passed a namespace.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T], [
-       AC_MSG_CHECKING([whether posix_acl_equiv_mode() wants umode_t])
+AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS], [
+       AC_MSG_CHECKING([whether posix_acl_valid() wants user namespace])
        ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
                #include <linux/posix_acl.h>
        ],[
-               umode_t tmp;
-               posix_acl_equiv_mode(NULL,&tmp);
+               struct user_namespace *user_ns = NULL;
+               const struct posix_acl *acl = NULL;
+               int error;
+
+               error = posix_acl_valid(user_ns, acl);
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T, 1,
-                   [ posix_acl_equiv_mode wants umode_t*])
+               AC_DEFINE(HAVE_POSIX_ACL_VALID_WITH_NS, 1,
+                   [posix_acl_valid() wants user namespace])
        ],[
                AC_MSG_RESULT(no)
        ])
@@ -247,18 +250,20 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL], [
 ])
 
 dnl #
-dnl # 2.6.30 API change,
-dnl # current_umask exists only since this version.
+dnl # 4.7 API change,
+dnl # The kernel get_acl will now check cache before calling i_op->get_acl and
+dnl # do set_cached_acl after that, so i_op->get_acl don't need to do that
+dnl # anymore.
 dnl #
-AC_DEFUN([ZFS_AC_KERNEL_CURRENT_UMASK], [
-       AC_MSG_CHECKING([whether current_umask exists])
+AC_DEFUN([ZFS_AC_KERNE_GET_ACL_HANDLE_CACHE], [
+       AC_MSG_CHECKING([whether uncached_acl_sentinel() exists])
        ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
        ],[
-               current_umask();
+               void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL);
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_CURRENT_UMASK, 1, [current_umask() exists])
+               AC_DEFINE(HAVE_KERNEL_GET_ACL_HANDLE_CACHE, 1, [uncached_acl_sentinel() exists])
        ],[
                AC_MSG_RESULT(no)
        ])
diff --git a/config/kernel-bio-op.m4 b/config/kernel-bio-op.m4
new file mode 100644 (file)
index 0000000..b4b6995
--- /dev/null
@@ -0,0 +1,67 @@
+dnl #
+dnl # Linux 4.8 API,
+dnl #
+dnl # The bio_op() helper was introduced as a replacement for explicitly
+dnl # checking the bio->bi_rw flags.  The following checks are used to
+dnl # detect if a specific operation is supported.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_REQ_OP_DISCARD], [
+       AC_MSG_CHECKING([whether REQ_OP_DISCARD is defined])
+       ZFS_LINUX_TRY_COMPILE([
+               #include <linux/blk_types.h>
+       ],[
+               enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_REQ_OP_DISCARD, 1,
+                   [REQ_OP_DISCARD is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_REQ_OP_SECURE_ERASE], [
+       AC_MSG_CHECKING([whether REQ_OP_SECURE_ERASE is defined])
+       ZFS_LINUX_TRY_COMPILE([
+               #include <linux/blk_types.h>
+       ],[
+               enum req_op op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_REQ_OP_SECURE_DISCARD, 1,
+                   [REQ_OP_SECURE_ERASE is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+])
+
+
+AC_DEFUN([ZFS_AC_KERNEL_REQ_OP_FLUSH], [
+       AC_MSG_CHECKING([whether REQ_OP_FLUSH is defined])
+       ZFS_LINUX_TRY_COMPILE([
+               #include <linux/blk_types.h>
+       ],[
+               enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_REQ_OP_FLUSH, 1,
+                   [REQ_OP_FLUSH is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_BIO_BI_OPF], [
+       AC_MSG_CHECKING([whether bio->bi_opf is defined])
+       ZFS_LINUX_TRY_COMPILE([
+               #include <linux/bio.h>
+       ],[
+               struct bio bio __attribute__ ((unused));
+               bio.bi_opf = 0;
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_BIO_BI_OPF, 1, [bio->bi_opf is defined])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+])
index bb74ea1c59459a34ebfc9947373f9f234502ed8d..1baab83a4e8cda01d14ea7e23d56f54986dd9230 100644 (file)
@@ -22,25 +22,64 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_FLUSH], [
                AC_MSG_RESULT(yes)
                AC_DEFINE(HAVE_BLK_QUEUE_FLUSH, 1,
                          [blk_queue_flush() is available])
+
+               AC_MSG_CHECKING([whether blk_queue_flush() is GPL-only])
+               ZFS_LINUX_TRY_COMPILE([
+                       #include <linux/module.h>
+                       #include <linux/blkdev.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
+               ],[
+                       struct request_queue *q = NULL;
+                       (void) blk_queue_flush(q, REQ_FLUSH);
+               ],[
+                       AC_MSG_RESULT(no)
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_BLK_QUEUE_FLUSH_GPL_ONLY, 1,
+                                 [blk_queue_flush() is GPL-only])
+               ])
        ],[
                AC_MSG_RESULT(no)
        ])
 
-       AC_MSG_CHECKING([whether blk_queue_flush() is GPL-only])
+       dnl #
+       dnl # 4.7 API change
+       dnl # Replace blk_queue_flush with blk_queue_write_cache
+       dnl #
+       AC_MSG_CHECKING([whether blk_queue_write_cache() exists])
        ZFS_LINUX_TRY_COMPILE([
-               #include <linux/module.h>
+               #include <linux/kernel.h>
                #include <linux/blkdev.h>
 
-               MODULE_LICENSE("$ZFS_META_LICENSE");
        ],[
                struct request_queue *q = NULL;
-               (void) blk_queue_flush(q, REQ_FLUSH);
-       ],[
-               AC_MSG_RESULT(no)
+               blk_queue_write_cache(q, true, true);
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_BLK_QUEUE_FLUSH_GPL_ONLY, 1,
-                         [blk_queue_flush() is GPL-only])
+               AC_DEFINE(HAVE_BLK_QUEUE_WRITE_CACHE, 1,
+                       [blk_queue_write_cache() exists])
+
+               AC_MSG_CHECKING([whether blk_queue_write_cache() is GPL-only])
+               ZFS_LINUX_TRY_COMPILE([
+                       #include <linux/kernel.h>
+                       #include <linux/module.h>
+                       #include <linux/blkdev.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
+               ],[
+                       struct request_queue *q = NULL;
+                       blk_queue_write_cache(q, true, true);
+               ],[
+                       AC_MSG_RESULT(no)
+               ],[
+                       AC_MSG_RESULT(yes)
+                       AC_DEFINE(HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY, 1,
+                                 [blk_queue_write_cache() is GPL-only])
+               ])
+       ],[
+               AC_MSG_RESULT(no)
        ])
+
        EXTRA_KCFLAGS="$tmp_flags"
 ])
diff --git a/config/kernel-submit_bio.m4 b/config/kernel-submit_bio.m4
new file mode 100644 (file)
index 0000000..da5f85c
--- /dev/null
@@ -0,0 +1,20 @@
+dnl #
+dnl # 4.8 API change
+dnl # The rw argument has been removed from submit_bio/submit_bio_wait.
+dnl # Callers are now expected to set bio->bi_rw instead of passing it in.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_SUBMIT_BIO], [
+       AC_MSG_CHECKING([whether submit_bio() wants 1 arg])
+       ZFS_LINUX_TRY_COMPILE([
+               #include <linux/bio.h>
+       ],[
+               blk_qc_t blk_qc;
+               struct bio *bio = NULL;
+               blk_qc = submit_bio(bio);
+       ],[
+               AC_MSG_RESULT(yes)
+               AC_DEFINE(HAVE_1ARG_SUBMIT_BIO, 1, [submit_bio() wants 1 arg])
+       ],[
+               AC_MSG_RESULT(no)
+       ])
+])
index c2c65622ca3cefbc66521b29f328dea5dc766f89..7b1599e1326989b994642a90df66b32a7e8ccec3 100644 (file)
@@ -1,8 +1,8 @@
-dnl #
-dnl # 3.11 API change
-dnl #
 AC_DEFUN([ZFS_AC_KERNEL_VFS_ITERATE], [
-       AC_MSG_CHECKING([whether fops->iterate() is available])
+       dnl #
+       dnl # 4.7 API change
+       dnl #
+       AC_MSG_CHECKING([whether fops->iterate_shared() is available])
        ZFS_LINUX_TRY_COMPILE([
                #include <linux/fs.h>
                int iterate(struct file *filp, struct dir_context * context)
@@ -10,34 +10,55 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_ITERATE], [
 
                static const struct file_operations fops
                    __attribute__ ((unused)) = {
-                       .iterate         = iterate,
+                       .iterate_shared  = iterate,
                };
        ],[
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_VFS_ITERATE, 1,
-                         [fops->iterate() is available])
+               AC_DEFINE(HAVE_VFS_ITERATE_SHARED, 1,
+                         [fops->iterate_shared() is available])
        ],[
                AC_MSG_RESULT(no)
 
-               AC_MSG_CHECKING([whether fops->readdir() is available])
+               dnl #
+               dnl # 3.11 API change
+               dnl #
+               AC_MSG_CHECKING([whether fops->iterate() is available])
                ZFS_LINUX_TRY_COMPILE([
                        #include <linux/fs.h>
-                       int readdir(struct file *filp, void *entry, filldir_t func)
+                       int iterate(struct file *filp, struct dir_context * context)
                            { return 0; }
 
                        static const struct file_operations fops
                            __attribute__ ((unused)) = {
-                               .readdir = readdir,
+                               .iterate         = iterate,
                        };
                ],[
                ],[
                        AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_VFS_READDIR, 1,
-                                 [fops->readdir() is available])
+                       AC_DEFINE(HAVE_VFS_ITERATE, 1,
+                                 [fops->iterate() is available])
                ],[
-                       AC_MSG_ERROR(no; file a bug report with ZFSOnLinux)
-               ])
+                       AC_MSG_RESULT(no)
+
+                       AC_MSG_CHECKING([whether fops->readdir() is available])
+                       ZFS_LINUX_TRY_COMPILE([
+                               #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,
+                               };
+                       ],[
+                       ],[
+                               AC_MSG_RESULT(yes)
+                               AC_DEFINE(HAVE_VFS_READDIR, 1,
+                                         [fops->readdir() is available])
+                       ],[
+                               AC_MSG_ERROR(no; file a bug report with ZFSOnLinux)
+                       ])
+               ])
        ])
 ])
index f6142871d16b345c2b1584c0d9f3cf53d6cb46f4..dcffd4480c75672feb85f53704170d6d6705393e 100644 (file)
@@ -62,18 +62,17 @@ dnl # Supported xattr handler get() interfaces checked newest to oldest.
 dnl #
 AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [
        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 # 4.7 API change,
+       dnl # The xattr_handler->get() callback was changed to take both
+       dnl # dentry and inode.
        dnl #
-       AC_MSG_CHECKING([whether xattr_handler->get() wants xattr_handler])
+       AC_MSG_CHECKING([whether xattr_handler->get() wants both dentry and inode])
        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; }
+                   struct dentry *dentry, struct inode *inode,
+                   const char *name, void *buffer, size_t size) { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
                        .get = get,
@@ -81,23 +80,22 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [
        ],[
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_XATTR_GET_HANDLER, 1,
-                   [xattr_handler->get() wants xattr_handler])
+               AC_DEFINE(HAVE_XATTR_GET_DENTRY_INODE, 1,
+                   [xattr_handler->get() wants both dentry and inode])
        ],[
                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 # 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_RESULT(no)
-               AC_MSG_CHECKING([whether xattr_handler->get() wants dentry])
+               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,
@@ -105,20 +103,23 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [
                ],[
                ],[
                        AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_XATTR_GET_DENTRY, 1,
-                           [xattr_handler->get() wants dentry])
+                       AC_DEFINE(HAVE_XATTR_GET_HANDLER, 1,
+                           [xattr_handler->get() wants xattr_handler])
                ],[
                        dnl #
-                       dnl # 2.6.32 API
+                       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 inode])
+                       AC_MSG_CHECKING([whether xattr_handler->get() wants dentry])
                        ZFS_LINUX_TRY_COMPILE([
                                #include <linux/xattr.h>
 
-                               int get(struct inode *ip, 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,
@@ -126,10 +127,32 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [
                        ],[
                        ],[
                                AC_MSG_RESULT(yes)
-                               AC_DEFINE(HAVE_XATTR_GET_INODE, 1,
-                                   [xattr_handler->get() wants inode])
+                               AC_DEFINE(HAVE_XATTR_GET_DENTRY, 1,
+                                   [xattr_handler->get() wants dentry])
                        ],[
-                               AC_MSG_ERROR([no; please file a bug report])
+                               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])
+                               ])
                        ])
                ])
        ])
@@ -140,18 +163,18 @@ dnl # Supported xattr handler set() interfaces checked newest to oldest.
 dnl #
 AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_SET], [
        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 # 4.7 API change,
+       dnl # The xattr_handler->set() callback was changed to take both
+       dnl # dentry and inode.
        dnl #
-       AC_MSG_CHECKING([whether xattr_handler->set() wants xattr_handler])
+       AC_MSG_CHECKING([whether xattr_handler->set() wants both dentry and inode])
        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)
+                   struct dentry *dentry, struct inode *inode,
+                   const char *name, const void *buffer,
+                   size_t size, int flags)
                    { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
@@ -160,23 +183,23 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_SET], [
        ],[
        ],[
                AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_XATTR_SET_HANDLER, 1,
-                   [xattr_handler->set() wants xattr_handler])
+               AC_DEFINE(HAVE_XATTR_SET_DENTRY_INODE, 1,
+                   [xattr_handler->set() wants both dentry and inode])
        ],[
                dnl #
-               dnl # 2.6.33 API change,
+               dnl # 4.4 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 # xattr_handler, and handler_flags argument was removed and
+               dnl # should be accessed by handler->flags.
                dnl #
-               AC_MSG_RESULT(no)
-               AC_MSG_CHECKING([whether xattr_handler->set() wants dentry])
+               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,
@@ -184,21 +207,23 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_SET], [
                ],[
                ],[
                        AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_XATTR_SET_DENTRY, 1,
-                           [xattr_handler->set() wants dentry])
+                       AC_DEFINE(HAVE_XATTR_SET_HANDLER, 1,
+                           [xattr_handler->set() wants xattr_handler])
                ],[
                        dnl #
-                       dnl # 2.6.32 API
+                       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 inode])
+                       AC_MSG_CHECKING([whether xattr_handler->set() wants dentry])
                        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; }
+                               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,
@@ -206,10 +231,33 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_SET], [
                        ],[
                        ],[
                                AC_MSG_RESULT(yes)
-                               AC_DEFINE(HAVE_XATTR_SET_INODE, 1,
-                                   [xattr_handler->set() wants inode])
+                               AC_DEFINE(HAVE_XATTR_SET_DENTRY, 1,
+                                   [xattr_handler->set() wants dentry])
                        ],[
-                               AC_MSG_ERROR([no; please file a bug report])
+                               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])
+                               ])
                        ])
                ])
        ])
index a9f1b6acd40a4d23db739b6221c1166fa6cafd3a..53720eeef5cfff103ae5aaf04aab064081d9e1b6 100644 (file)
@@ -8,6 +8,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
        ZFS_AC_KERNEL_CONFIG
        ZFS_AC_KERNEL_DECLARE_EVENT_CLASS
        ZFS_AC_KERNEL_CURRENT_BIO_TAIL
+       ZFS_AC_KERNEL_SUBMIT_BIO
        ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS
        ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
        ZFS_AC_KERNEL_TYPE_FMODE_T
@@ -22,6 +23,10 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
        ZFS_AC_KERNEL_BIO_BVEC_ITER
        ZFS_AC_KERNEL_BIO_FAILFAST_DTD
        ZFS_AC_KERNEL_REQ_FAILFAST_MASK
+       ZFS_AC_KERNEL_REQ_OP_DISCARD
+       ZFS_AC_KERNEL_REQ_OP_SECURE_ERASE
+       ZFS_AC_KERNEL_REQ_OP_FLUSH
+       ZFS_AC_KERNEL_BIO_BI_OPF
        ZFS_AC_KERNEL_BIO_END_IO_T_ARGS
        ZFS_AC_KERNEL_BIO_RW_BARRIER
        ZFS_AC_KERNEL_BIO_RW_DISCARD
@@ -40,14 +45,14 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
        ZFS_AC_KERNEL_POSIX_ACL_FROM_XATTR_USERNS
        ZFS_AC_KERNEL_POSIX_ACL_RELEASE
        ZFS_AC_KERNEL_POSIX_ACL_CHMOD
-       ZFS_AC_KERNEL_POSIX_ACL_CACHING
        ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
+       ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS
        ZFS_AC_KERNEL_INODE_OPERATIONS_PERMISSION
        ZFS_AC_KERNEL_INODE_OPERATIONS_PERMISSION_WITH_NAMEIDATA
        ZFS_AC_KERNEL_INODE_OPERATIONS_CHECK_ACL
        ZFS_AC_KERNEL_INODE_OPERATIONS_CHECK_ACL_WITH_FLAGS
        ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL
-       ZFS_AC_KERNEL_CURRENT_UMASK
+       ZFS_AC_KERNE_GET_ACL_HANDLE_CACHE
        ZFS_AC_KERNEL_SHOW_OPTIONS
        ZFS_AC_KERNEL_FILE_INODE
        ZFS_AC_KERNEL_FSYNC
index 4ae6130c6f392965ec5d464c643ef638f48d43fb..ecaed8bab15908b88a70d0e108d009651b1103ac 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.7.
+# Generated by GNU Autoconf 2.68 for zfs 0.6.5.8.
 #
 #
 # 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.7'
-PACKAGE_STRING='zfs 0.6.5.7'
+PACKAGE_VERSION='0.6.5.8'
+PACKAGE_STRING='zfs 0.6.5.8'
 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.7 to adapt to many kinds of systems.
+\`configure' configures zfs 0.6.5.8 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.7:";;
+     short | recursive ) echo "Configuration of zfs 0.6.5.8:";;
    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.7
+zfs configure 0.6.5.8
 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.7, which was
+It was created by zfs $as_me 0.6.5.8, 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.7'
+ VERSION='0.6.5.8'
 
 
 cat >>confdefs.h <<_ACEOF
 
 
 
+fi
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether submit_bio() wants 1 arg" >&5
+$as_echo_n "checking whether submit_bio() wants 1 arg... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               blk_qc_t blk_qc;
+               struct bio *bio = NULL;
+               blk_qc = submit_bio(bio);
+
+  ;
+  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_1ARG_SUBMIT_BIO 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 bio_end_io_t wants 1 arg" >&5
-$as_echo_n "checking whether bio_end_io_t wants 1 arg... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_OP_DISCARD is defined" >&5
+$as_echo_n "checking whether REQ_OP_DISCARD is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/bio.h>
-
-               void wanted_end_io(struct bio *bio) { return; }
-
-               bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
+               #include <linux/blk_types.h>
 
 int
 main (void)
 {
 
+               enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD;
 
   ;
   return 0;
@@ -14172,7 +14236,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_REQ_OP_DISCARD 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 REQ_OP_SECURE_ERASE is defined" >&5
+$as_echo_n "checking whether REQ_OP_SECURE_ERASE is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/bio.h>
+               #include <linux/blk_types.h>
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = BIO_RW_BARRIER;
+               enum req_op op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
 
   ;
   return 0;
@@ -14238,7 +14301,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_REQ_OP_SECURE_DISCARD 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 REQ_OP_FLUSH is defined" >&5
+$as_echo_n "checking whether REQ_OP_FLUSH is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/bio.h>
+               #include <linux/blk_types.h>
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = BIO_RW_DISCARD;
+               enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH;
 
   ;
   return 0;
@@ -14304,7 +14366,7 @@ _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_REQ_OP_FLUSH 1" >>confdefs.h
 
 
 else
 
 
 
-       { $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 bio->bi_opf is defined" >&5
+$as_echo_n "checking whether bio->bi_opf is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/blkdev.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_flush(q, REQ_FLUSH);
+               struct bio bio __attribute__ ((unused));
+               bio.bi_opf = 0;
 
   ;
   return 0;
@@ -14372,7 +14432,7 @@ _ACEOF
                { $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_BIO_BI_OPF 1" >>confdefs.h
 
 
 else
 
 
 
-       { $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 request_queue *q = NULL;
-               (void) blk_queue_flush(q, REQ_FLUSH);
-
-  ;
-  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: 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_BLK_QUEUE_FLUSH_GPL_ONLY 1" >>confdefs.h
-
-
-
-
-fi
-       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 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/blkdev.h>
-
-int
-main (void)
-{
-
-               struct request_queue *q = NULL;
-               (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
-
-  ;
-  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_BLK_QUEUE_MAX_HW_SECTORS 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
-
-
-       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}"
-
-
-cat confdefs.h - <<_ACEOF >conftest.c
+               #include <linux/bio.h>
 
+               void wanted_end_io(struct bio *bio) { return; }
 
-               #include <linux/blkdev.h>
+               bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
 
 int
 main (void)
 {
 
-               struct request_queue *q = NULL;
-               (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
 
   ;
   return 0;
@@ -14578,7 +14500,7 @@ _ACEOF
                { $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_1ARG_BIO_END_IO_T 1" >>confdefs.h
 
 
 else
        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 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/blkdev.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               struct gendisk *disk = NULL;
-               (void) get_disk_ro(disk);
+               int flags __attribute__ ((unused));
+               flags = BIO_RW_BARRIER;
 
   ;
   return 0;
@@ -14647,7 +14566,7 @@ _ACEOF
                { $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_BIO_RW_BARRIER 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 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/genhd.h>
+               #include <linux/bio.h>
 
 int
 main (void)
 {
 
-               get_gendisk(0, NULL);
+               int flags __attribute__ ((unused));
+               flags = BIO_RW_DISCARD;
+
+  ;
+  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_BIO_RW_DISCARD 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 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/blkdev.h>
+
+int
+main (void)
+{
+
+               struct request_queue *q = NULL;
+               (void) blk_queue_flush(q, REQ_FLUSH);
+
+  ;
+  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_BLK_QUEUE_FLUSH 1" >>confdefs.h
+
+
+               { $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 request_queue *q = NULL;
+                       (void) blk_queue_flush(q, REQ_FLUSH);
+
+  ;
+  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: 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_BLK_QUEUE_FLUSH_GPL_ONLY 1" >>confdefs.h
+
+
+
+
+fi
+       rm -Rf build
+
+
+
+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 blk_queue_write_cache() exists" >&5
+$as_echo_n "checking whether blk_queue_write_cache() exists... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/kernel.h>
+               #include <linux/blkdev.h>
+
+
+int
+main (void)
+{
+
+               struct request_queue *q = NULL;
+               blk_queue_write_cache(q, true, true);
+
+  ;
+  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_BLK_QUEUE_WRITE_CACHE 1" >>confdefs.h
+
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_write_cache() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_write_cache() is GPL-only... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+                       #include <linux/kernel.h>
+                       #include <linux/module.h>
+                       #include <linux/blkdev.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+                       struct request_queue *q = NULL;
+                       blk_queue_write_cache(q, true, true);
+
+  ;
+  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: 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_BLK_QUEUE_WRITE_CACHE_GPL_ONLY 1" >>confdefs.h
+
+
+
+
+fi
+       rm -Rf build
+
+
+
+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
+
+
+
+       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}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct request_queue *q = NULL;
+               (void) blk_queue_max_hw_sectors(q, BLK_SAFE_MAX_SECTORS);
+
+  ;
+  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_BLK_QUEUE_MAX_HW_SECTORS 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
+
+
+       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}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct request_queue *q = NULL;
+               (void) blk_queue_max_segments(q, BLK_MAX_SEGMENTS);
+
+  ;
+  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_BLK_QUEUE_MAX_SEGMENTS 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
+
+
+       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}"
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/blkdev.h>
+
+int
+main (void)
+{
+
+               struct gendisk *disk = NULL;
+               (void) get_disk_ro(disk);
+
+  ;
+  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_GET_DISK_RO 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
+
+
+       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; }
+
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/genhd.h>
+
+int
+main (void)
+{
+
+               get_gendisk(0, NULL);
 
   ;
   return 0;
@@ -14985,8 +15450,8 @@ fi
 
 
 
-                                                       { $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 both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants both dentry and inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -14995,8 +15460,8 @@ 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; }
+                   struct dentry *dentry, struct inode *inode,
+                   const char *name, void *buffer, size_t size) { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
                        .get = get,
@@ -15039,17 +15504,15 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_XATTR_GET_HANDLER 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_GET_DENTRY_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 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
@@ -15057,9 +15520,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,
@@ -15099,33 +15562,190 @@ _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_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 "no" >&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
+
+
+                               #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)
+{
+
+
+  ;
+  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_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->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_DENTRY 1" >>confdefs.h
+$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: 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; }
+                                       as_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+
+fi
+       rm -Rf build
+
+
+
+
+                                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants both dentry and inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-                               #include <linux/xattr.h>
+               #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 set(const struct xattr_handler *handler,
+                   struct dentry *dentry, struct inode *inode,
+                   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)
@@ -15161,57 +15781,33 @@ _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_XATTR_GET_INODE 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_SET_DENTRY_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
-
-
-
-
-
-fi
-       rm -Rf build
-
-
-
-
-                                                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants xattr_handler" >&5
+                                                                                                               { $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/xattr.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 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)
@@ -15247,7 +15843,7 @@ _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_XATTR_SET_HANDLER 1" >>confdefs.h
@@ -15257,24 +15853,24 @@ 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 dentry" >&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; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-                       #include <linux/xattr.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 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)
@@ -15310,7 +15906,7 @@ _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_XATTR_SET_DENTRY 1" >>confdefs.h
@@ -15320,24 +15916,24 @@ 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 "$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>
+                                       #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 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)
@@ -15373,7 +15969,7 @@ _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_XATTR_SET_INODE 1" >>confdefs.h
@@ -15383,7 +15979,14 @@ 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_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+       rm -Rf build
+
+
 
 
 
 
 
 
-       { $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 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/fs.h>
+               #include <linux/posix_acl.h>
 
 int
 main (void)
 {
 
-               struct inode ino;
-               ino.i_acl = NULL;
-               ino.i_default_acl = NULL;
+               umode_t tmp;
+               posix_acl_equiv_mode(NULL,&tmp);
 
   ;
   return 0;
@@ -16202,7 +16805,7 @@ _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_POSIX_ACL_EQUIV_MODE_UMODE_T 1" >>confdefs.h
 
 
 else
@@ -16220,8 +16823,8 @@ fi
 
 
 
-       { $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 posix_acl_valid() wants user namespace" >&5
+$as_echo_n "checking whether posix_acl_valid() wants user namespace... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16234,8 +16837,11 @@ int
 main (void)
 {
 
-               umode_t tmp;
-               posix_acl_equiv_mode(NULL,&tmp);
+               struct user_namespace *user_ns = NULL;
+               const struct posix_acl *acl = NULL;
+               int error;
+
+               error = posix_acl_valid(user_ns, acl);
 
   ;
   return 0;
@@ -16269,7 +16875,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_POSIX_ACL_VALID_WITH_NS 1" >>confdefs.h
 
 
 else
@@ -16651,8 +17257,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current_umask exists" >&5
-$as_echo_n "checking whether current_umask exists... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uncached_acl_sentinel() exists" >&5
+$as_echo_n "checking whether uncached_acl_sentinel() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -16664,7 +17270,7 @@ int
 main (void)
 {
 
-               current_umask();
+               void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL);
 
   ;
   return 0;
@@ -16698,7 +17304,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CURRENT_UMASK 1" >>confdefs.h
+$as_echo "#define HAVE_KERNEL_GET_ACL_HANDLE_CACHE 1" >>confdefs.h
 
 
 else
@@ -20588,8 +21194,8 @@ $as_echo "#define HAVE_LSEEK_EXECUTE 1" >>confdefs.h
 
 
 
-       { $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}: checking whether fops->iterate_shared() is available" >&5
+$as_echo_n "checking whether fops->iterate_shared() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -20601,7 +21207,7 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                static const struct file_operations fops
                    __attribute__ ((unused)) = {
-                       .iterate         = iterate,
+                       .iterate_shared  = iterate,
                };
 
 int
@@ -20638,80 +21244,150 @@ _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_ITERATE_SHARED 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->iterate() is available" >&5
+$as_echo_n "checking whether fops->iterate() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+                       #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)
+{
+
+
+  ;
+  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_VFS_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 "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
+
+
+                               #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,
+                               };
+
+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_VFS_ITERATE 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 fops->readdir() is available" >&5
-$as_echo_n "checking whether fops->readdir() is available... " >&6; }
+                               as_fn_error $? "no; file a bug report with ZFSOnLinux" "$LINENO" 5
 
 
-cat confdefs.h - <<_ACEOF >conftest.c
-
-
-                       #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,
-                       };
-
-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_VFS_READDIR 1" >>confdefs.h
 
+fi
+       rm -Rf build
 
-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
 
 
 
@@ -20722,7 +21398,6 @@ fi
 
 
 
-
 fi
        rm -Rf build
 
 
 
 
+fi
+       rm -Rf build
+
+
+
+
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether submit_bio() wants 1 arg" >&5
+$as_echo_n "checking whether submit_bio() wants 1 arg... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               blk_qc_t blk_qc;
+               struct bio *bio = NULL;
+               blk_qc = submit_bio(bio);
+
+  ;
+  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_1ARG_SUBMIT_BIO 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
 
@@ -23735,7 +24477,142 @@ _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_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: no" >&5
+$as_echo "no" >&6; }
+
+
+
+fi
+       rm -Rf build
+
+
+       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; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/bio.h>
+
+int
+main (void)
+{
+
+               struct bio bio;
+               bio.bi_iter.bi_sector = 0;
+
+  ;
+  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_BIO_BVEC_ITER 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 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/bio.h>
+
+int
+main (void)
+{
+
+               int flags __attribute__ ((unused));
+               flags = ((1 << BIO_RW_FAILFAST_DEV) |
+                        (1 << BIO_RW_FAILFAST_TRANSPORT) |
+                        (1 << BIO_RW_FAILFAST_DRIVER));
+
+  ;
+  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_BIO_RW_FAILFAST_DTD 1" >>confdefs.h
 
 
 else
        rm -Rf build
 
 
-       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 REQ_FAILFAST_MASK is defined" >&5
+$as_echo_n "checking whether REQ_FAILFAST_MASK is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23767,8 +24643,8 @@ int
 main (void)
 {
 
-               struct bio bio;
-               bio.bi_iter.bi_sector = 0;
+               int flags __attribute__ ((unused));
+               flags = REQ_FAILFAST_MASK;
 
   ;
   return 0;
@@ -23802,7 +24678,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_REQ_FAILFAST_MASK 1" >>confdefs.h
 
 
 else
 
 
 
-       { $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 REQ_OP_DISCARD is defined" >&5
+$as_echo_n "checking whether REQ_OP_DISCARD is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/bio.h>
+               #include <linux/blk_types.h>
 
 int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = ((1 << BIO_RW_FAILFAST_DEV) |
-                        (1 << BIO_RW_FAILFAST_TRANSPORT) |
-                        (1 << BIO_RW_FAILFAST_DRIVER));
+               enum req_op op __attribute__ ((unused)) = REQ_OP_DISCARD;
 
   ;
   return 0;
@@ -23870,7 +24743,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_REQ_OP_DISCARD 1" >>confdefs.h
 
 
 else
 
 
 
-       { $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; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether REQ_OP_SECURE_ERASE is defined" >&5
+$as_echo_n "checking whether REQ_OP_SECURE_ERASE is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/blk_types.h>
+
+int
+main (void)
+{
+
+               enum req_op op __attribute__ ((unused)) = REQ_OP_SECURE_ERASE;
+
+  ;
+  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_REQ_OP_SECURE_DISCARD 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 REQ_OP_FLUSH is defined" >&5
+$as_echo_n "checking whether REQ_OP_FLUSH is defined... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+               #include <linux/blk_types.h>
+
+int
+main (void)
+{
+
+               enum req_op op __attribute__ ((unused)) = REQ_OP_FLUSH;
+
+  ;
+  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_REQ_OP_FLUSH 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 bio->bi_opf is defined" >&5
+$as_echo_n "checking whether bio->bi_opf is defined... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -23901,8 +24904,8 @@ int
 main (void)
 {
 
-               int flags __attribute__ ((unused));
-               flags = REQ_FAILFAST_MASK;
+               struct bio bio __attribute__ ((unused));
+               bio.bi_opf = 0;
 
   ;
   return 0;
@@ -23936,7 +24939,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_REQ_FAILFAST_MASK 1" >>confdefs.h
+$as_echo "#define HAVE_BIO_BI_OPF 1" >>confdefs.h
 
 
 else
@@ -24207,6 +25210,74 @@ $as_echo "yes" >&6; }
 $as_echo "#define HAVE_BLK_QUEUE_FLUSH 1" >>confdefs.h
 
 
+               { $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 request_queue *q = NULL;
+                       (void) blk_queue_flush(q, REQ_FLUSH);
+
+  ;
+  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: 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_BLK_QUEUE_FLUSH_GPL_ONLY 1" >>confdefs.h
+
+
+
+
+fi
+       rm -Rf build
+
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
 
-       { $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 blk_queue_write_cache() exists" >&5
+$as_echo_n "checking whether blk_queue_write_cache() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
 
 
-               #include <linux/module.h>
+               #include <linux/kernel.h>
                #include <linux/blkdev.h>
 
-               MODULE_LICENSE("$ZFS_META_LICENSE");
 
 int
 main (void)
 {
 
                struct request_queue *q = NULL;
-               (void) blk_queue_flush(q, REQ_FLUSH);
+               blk_queue_write_cache(q, true, true);
+
+  ;
+  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_BLK_QUEUE_WRITE_CACHE 1" >>confdefs.h
+
+
+               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether blk_queue_write_cache() is GPL-only" >&5
+$as_echo_n "checking whether blk_queue_write_cache() is GPL-only... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+                       #include <linux/kernel.h>
+                       #include <linux/module.h>
+                       #include <linux/blkdev.h>
+
+                       MODULE_LICENSE("$ZFS_META_LICENSE");
+
+int
+main (void)
+{
+
+                       struct request_queue *q = NULL;
+                       blk_queue_write_cache(q, true, true);
 
   ;
   return 0;
@@ -24269,17 +25394,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: no" >&5
+                       { $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_BLK_QUEUE_FLUSH_GPL_ONLY 1" >>confdefs.h
+$as_echo "#define HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY 1" >>confdefs.h
 
 
 
        rm -Rf build
 
 
+
+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
+
+
+
        EXTRA_KCFLAGS="$tmp_flags"
 
 
@@ -24817,8 +25957,8 @@ fi
 
 
 
-                                                       { $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 both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->get() wants both dentry and inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -24827,8 +25967,8 @@ 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; }
+                   struct dentry *dentry, struct inode *inode,
+                   const char *name, void *buffer, size_t size) { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
                        .get = get,
@@ -24871,17 +26011,15 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_XATTR_GET_HANDLER 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_GET_DENTRY_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 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
@@ -24889,9 +26027,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,
@@ -24934,17 +26072,17 @@ _ACEOF
                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_XATTR_GET_DENTRY 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 inode" >&5
-$as_echo_n "checking whether xattr_handler->get() wants inode... " >&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
@@ -24952,8 +26090,9 @@ 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; }
+                               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,
@@ -24996,6 +26135,68 @@ _ACEOF
                                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
+$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 "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
 
 
@@ -25003,7 +26204,7 @@ 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_fn_error $? "no; please file a bug report" "$LINENO" 5
 
 
 
 
 
 
-                                                       { $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; }
+
+fi
+       rm -Rf build
+
+
+
+
+                                               { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether xattr_handler->set() wants both dentry and inode" >&5
+$as_echo_n "checking whether xattr_handler->set() wants both dentry and inode... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25037,8 +26245,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)
+                   struct dentry *dentry, struct inode *inode,
+                   const char *name, const void *buffer,
+                   size_t size, int flags)
                    { return 0; }
                static const struct xattr_handler
                    xops __attribute__ ((unused)) = {
@@ -25082,17 +26291,15 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_XATTR_SET_HANDLER 1" >>confdefs.h
+$as_echo "#define HAVE_XATTR_SET_DENTRY_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->set() wants dentry" >&5
-$as_echo_n "checking whether xattr_handler->set() wants dentry... " >&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; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -25100,9 +26307,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,
@@ -25145,17 +26353,17 @@ _ACEOF
                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_XATTR_SET_DENTRY 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 inode" >&5
-$as_echo_n "checking whether xattr_handler->set() wants inode... " >&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
@@ -25163,9 +26371,9 @@ 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; }
+                               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,
@@ -25208,6 +26416,69 @@ _ACEOF
                                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
+$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 "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
 
 
@@ -25215,7 +26486,14 @@ 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_fn_error $? "no; please file a bug report" "$LINENO" 5
+
+
+
+fi
+       rm -Rf build
+
+
 
 
 
 
 
 
-       { $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 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/fs.h>
+               #include <linux/posix_acl.h>
 
 int
 main (void)
 {
 
-               struct inode ino;
-               ino.i_acl = NULL;
-               ino.i_default_acl = NULL;
+               umode_t tmp;
+               posix_acl_equiv_mode(NULL,&tmp);
 
   ;
   return 0;
@@ -26034,7 +27312,7 @@ _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_POSIX_ACL_EQUIV_MODE_UMODE_T 1" >>confdefs.h
 
 
 else
@@ -26052,8 +27330,8 @@ fi
 
 
 
-       { $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 posix_acl_valid() wants user namespace" >&5
+$as_echo_n "checking whether posix_acl_valid() wants user namespace... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -26066,8 +27344,11 @@ int
 main (void)
 {
 
-               umode_t tmp;
-               posix_acl_equiv_mode(NULL,&tmp);
+               struct user_namespace *user_ns = NULL;
+               const struct posix_acl *acl = NULL;
+               int error;
+
+               error = posix_acl_valid(user_ns, acl);
 
   ;
   return 0;
@@ -26101,7 +27382,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_POSIX_ACL_VALID_WITH_NS 1" >>confdefs.h
 
 
 else
@@ -26483,8 +27764,8 @@ fi
 
 
 
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether current_umask exists" >&5
-$as_echo_n "checking whether current_umask exists... " >&6; }
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uncached_acl_sentinel() exists" >&5
+$as_echo_n "checking whether uncached_acl_sentinel() exists... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -26496,7 +27777,7 @@ int
 main (void)
 {
 
-               current_umask();
+               void *sentinel __attribute__ ((unused)) = uncached_acl_sentinel(NULL);
 
   ;
   return 0;
@@ -26530,7 +27811,7 @@ _ACEOF
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_CURRENT_UMASK 1" >>confdefs.h
+$as_echo "#define HAVE_KERNEL_GET_ACL_HANDLE_CACHE 1" >>confdefs.h
 
 
 else
@@ -30420,8 +31701,8 @@ $as_echo "#define HAVE_LSEEK_EXECUTE 1" >>confdefs.h
 
 
 
-       { $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}: checking whether fops->iterate_shared() is available" >&5
+$as_echo_n "checking whether fops->iterate_shared() is available... " >&6; }
 
 
 cat confdefs.h - <<_ACEOF >conftest.c
@@ -30433,7 +31714,7 @@ cat confdefs.h - <<_ACEOF >conftest.c
 
                static const struct file_operations fops
                    __attribute__ ((unused)) = {
-                       .iterate         = iterate,
+                       .iterate_shared  = iterate,
                };
 
 int
@@ -30473,7 +31754,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_VFS_ITERATE_SHARED 1" >>confdefs.h
 
 
 else
@@ -30483,20 +31764,20 @@ 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; }
+                                                               { $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/fs.h>
-                       int readdir(struct file *filp, void *entry, filldir_t func)
+                       int iterate(struct file *filp, struct dir_context * context)
                            { return 0; }
 
                        static const struct file_operations fops
                            __attribute__ ((unused)) = {
-                               .readdir = readdir,
+                               .iterate         = iterate,
                        };
 
 int
@@ -30536,6 +31817,69 @@ _ACEOF
                        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
+$as_echo "#define HAVE_VFS_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 "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
+
+
+                               #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,
+                               };
+
+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_VFS_READDIR 1" >>confdefs.h
 
 
@@ -30543,7 +31887,7 @@ 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
+                               as_fn_error $? "no; file a bug report with ZFSOnLinux" "$LINENO" 5
 
 
 
 
 
 
+fi
+       rm -Rf build
+
+
+
+
 
 fi
        rm -Rf build
@@ -32464,7 +33814,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.7, which was
+This file was extended by zfs $as_me 0.6.5.8, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -32530,7 +33880,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.7
+zfs config.status 0.6.5.8
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
index 7826ca29105707fb1735d1ae840eec6b7309bd30..118c3531b2ee5bc56cf00ac37ff1772eec535066 100644 (file)
@@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 1c97d6c6ff470250708102c5aec5e19a853c51cb..29ebd97a16825f8bfbe4a79d194754fab5919cb9 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 64cab1a779674de2f0ffa707f5b0afd03ccf7ca4..bc4a7e3c641e10ca25e2ea8a7c64e56bd5dbd05a 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index a1464f89f400f3b24e89373fa1db001f5518b0d3..b1f64e829e4032e79506ed2f37fdff40ed274fd3 100644 (file)
@@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index cfe9bc4c436a0aca3a97a845eb0a4837ebdecca9..7bfb9335ddc568c6f13661da97effc1700e3e468 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 327d705b7ff2b09c05a9720aa2ee25eb400722fb..711d0e18ad5fe9baa553e2be2da3eb84ae6956b3 100644 (file)
@@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index d3624b78b307343380463f5cce129a392749334a..c45ec3af85015abadaf1278867719870e26fdeac 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index a196c03505f2410a716e05a5fe82305b035130cb..67dde479c1805ba5d4c95ec8e038792d2cb8137d 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 73304bc2cd4a8147d54ecd9b7bc7fcc4222a1146..8b41baa300cbfb80f1b68d324a993e683670ec45 100644 (file)
@@ -1 +1,3 @@
-zfs
+# Always load kernel modules at boot.  The default behavior is to load the
+# kernel modules in the zfs-import-*.service or when blkid(8) detects a pool.
+#zfs
index c1d7c06d9145d78222b6d867f1c6e1e0a8a8eae1..cdb6a6a274819ef3fcd0535bf1ba1426da1caebd 100644 (file)
@@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 4efdd7200655274106c77b8f0b6a1351dbeefec2..4d82778e35ba7d60a76cb7c96f4f1465e13461e4 100644 (file)
@@ -1,2 +1,7 @@
 # ZFS is enabled by default
-enable zfs.*
+enable zfs-import-cache.service
+disable zfs-import-scan.service
+enable zfs-mount.service
+enable zfs-share.service
+enable zfs-zed.service
+enable zfs.target
index 82aedd1ea08068c5969c05419f53668ea5c86d42..f7023dff07097a026164d7e3fd8cf47df90bb08a 100644 (file)
@@ -2,7 +2,7 @@ systemdpreset_DATA = \
        50-zfs.preset
 
 systemdunit_DATA = \
-       zed.service \
+       zfs-zed.service \
        zfs-import-cache.service \
        zfs-import-scan.service \
        zfs-mount.service \
@@ -10,7 +10,7 @@ systemdunit_DATA = \
        zfs.target
 
 EXTRA_DIST = \
-       $(top_srcdir)/etc/systemd/system/zed.service.in \
+       $(top_srcdir)/etc/systemd/system/zfs-zed.service.in \
        $(top_srcdir)/etc/systemd/system/zfs-import-cache.service.in \
        $(top_srcdir)/etc/systemd/system/zfs-import-scan.service.in \
        $(top_srcdir)/etc/systemd/system/zfs-mount.service.in \
index 562cfe055eccc36071b5ebac59880835f560604f..3e87b46e4606be37feccd9b45b12a5999e133069 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
@@ -367,7 +369,7 @@ systemdpreset_DATA = \
        50-zfs.preset
 
 systemdunit_DATA = \
-       zed.service \
+       zfs-zed.service \
        zfs-import-cache.service \
        zfs-import-scan.service \
        zfs-mount.service \
@@ -375,7 +377,7 @@ systemdunit_DATA = \
        zfs.target
 
 EXTRA_DIST = \
-       $(top_srcdir)/etc/systemd/system/zed.service.in \
+       $(top_srcdir)/etc/systemd/system/zfs-zed.service.in \
        $(top_srcdir)/etc/systemd/system/zfs-import-cache.service.in \
        $(top_srcdir)/etc/systemd/system/zfs-import-scan.service.in \
        $(top_srcdir)/etc/systemd/system/zfs-mount.service.in \
diff --git a/etc/systemd/system/zed.service.in b/etc/systemd/system/zed.service.in
deleted file mode 100644 (file)
index 5b23630..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-[Unit]
-Description=ZFS Event Daemon (zed)
-Documentation=man:zed(8)
-After=zfs-import-cache.service
-After=zfs-import-scan.service
-
-[Service]
-ExecStart=@sbindir@/zed -F
-Restart=on-abort
index b1deb6ed96307678462efd7a00d31ee0dfed4464..8a444b13da2292c781dc57d7a734289b6471b214 100644 (file)
@@ -4,6 +4,7 @@ DefaultDependencies=no
 Requires=systemd-udev-settle.service
 After=systemd-udev-settle.service
 After=cryptsetup.target
+After=systemd-remount-fs.service
 ConditionPathExists=@sysconfdir@/zfs/zpool.cache
 
 [Service]
@@ -11,3 +12,7 @@ Type=oneshot
 RemainAfterExit=yes
 ExecStartPre=/sbin/modprobe zfs
 ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN
+
+[Install]
+WantedBy=zfs-mount.service
+WantedBy=zfs.target
index 517e12e3a26e797c8a07b6f1ec697e2da64f3e5e..01052838a948e49b01ab9f76c8d107d09ea97ca1 100644 (file)
@@ -10,4 +10,8 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
 Type=oneshot
 RemainAfterExit=yes
 ExecStartPre=/sbin/modprobe zfs
-ExecStart=@sbindir@/zpool import -d /dev/disk/by-id -aN
+ExecStart=@sbindir@/zpool import -aN -o cachefile=none
+
+[Install]
+WantedBy=zfs-mount.service
+WantedBy=zfs.target
index f1056af311cd87cbeb017ecd82b32c22bb5a9f85..0664fd9e7665ae55cd5cbf328d0c4937d046f224 100644 (file)
@@ -1,15 +1,17 @@
 [Unit]
 Description=Mount ZFS filesystems
 DefaultDependencies=no
-Wants=zfs-import-cache.service
-Wants=zfs-import-scan.service
-Requires=systemd-udev-settle.service
 After=systemd-udev-settle.service
 After=zfs-import-cache.service
 After=zfs-import-scan.service
+After=systemd-remount-fs.service
 Before=local-fs.target
 
 [Service]
 Type=oneshot
 RemainAfterExit=yes
 ExecStart=@sbindir@/zfs mount -a
+
+[Install]
+WantedBy=zfs-share.service
+WantedBy=zfs.target
index c27bbf903ecbe7afac20f5a8ca05200cbb7149e1..688731ea3e273c8a7d778f30ddf41d8b4e13a68d 100644 (file)
@@ -1,14 +1,16 @@
 [Unit]
 Description=ZFS file system shares
-After=nfs-server.service
+After=nfs-server.service nfs-kernel-server.service
 After=smb.service
 After=zfs-mount.service
-Requires=zfs-mount.service
-PartOf=nfs-server.service
+PartOf=nfs-server.service nfs-kernel-server.service
 PartOf=smb.service
 
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStartPre=-@bindir@/rm /etc/dfs/sharetab
+ExecStartPre=-@bindir@/rm -f /etc/dfs/sharetab
 ExecStart=@sbindir@/zfs share -a
+
+[Install]
+WantedBy=zfs.target
diff --git a/etc/systemd/system/zfs-zed.service.in b/etc/systemd/system/zfs-zed.service.in
new file mode 100644 (file)
index 0000000..e3dec3d
--- /dev/null
@@ -0,0 +1,13 @@
+[Unit]
+Description=ZFS Event Daemon (zed)
+Documentation=man:zed(8)
+After=zfs-import-cache.service
+After=zfs-import-scan.service
+
+[Service]
+ExecStart=@sbindir@/zed -F
+Restart=on-abort
+
+[Install]
+Alias=zed.service
+WantedBy=zfs.target
index 35415338560a87122f5a2facc161b386c63e0bf3..4699463b0ddf334430eafacb4d4d99d0144e49a1 100644 (file)
@@ -1,8 +1,5 @@
 [Unit]
 Description=ZFS startup target
-Requires=zfs-mount.service
-Requires=zfs-share.service
-Wants=zed.service
 
 [Install]
 WantedBy=multi-user.target
index eb321986b56e0b664e090bd3e384070302671ea7..a2099659db6fefec136124870cec249765e6a42b 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index c7e241ec17da02981e52677d404fb66e5213ea38..4b6fd072af741907f7ba50d678c3ae6f33c16498 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 6c24b47885e6a15ee438deb5bbce579e74d87375..edf5b91929064e7b320e1498264bebb7fb96ae35 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 868b89c55cbbad13825bf07cb1b3c5ee09e31c11..d26d242954c1121baccaea52c8932c969d7aa0c9 100644 (file)
@@ -37,21 +37,48 @@ typedef unsigned __bitwise__ fmode_t;
 #endif /* HAVE_FMODE_T */
 
 /*
- * 2.6.36 API change,
+ * 4.7 - 4.x API,
+ * The blk_queue_write_cache() interface has replaced blk_queue_flush()
+ * interface.  However, the new interface is GPL-only thus we implement
+ * our own trivial wrapper when the GPL-only version is detected.
+ *
+ * 2.6.36 - 4.6 API,
  * The blk_queue_flush() interface has replaced blk_queue_ordered()
  * interface.  However, while the old interface was available to all the
  * new one is GPL-only.   Thus if the GPL-only version is detected we
- * implement our own trivial helper compatibility funcion.   The hope is
- * that long term this function will be opened up.
+ * implement our own trivial helper.
+ *
+ * 2.6.x - 2.6.35
+ * Legacy blk_queue_ordered() interface.
  */
-#if defined(HAVE_BLK_QUEUE_FLUSH) && defined(HAVE_BLK_QUEUE_FLUSH_GPL_ONLY)
-#define        blk_queue_flush __blk_queue_flush
 static inline void
-__blk_queue_flush(struct request_queue *q, unsigned int flags)
+blk_queue_set_write_cache(struct request_queue *q, bool wc, bool fua)
 {
-       q->flush_flags = flags & (REQ_FLUSH | REQ_FUA);
+#if defined(HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY)
+       spin_lock_irq(q->queue_lock);
+       if (wc)
+               queue_flag_set(QUEUE_FLAG_WC, q);
+       else
+               queue_flag_clear(QUEUE_FLAG_WC, q);
+       if (fua)
+               queue_flag_set(QUEUE_FLAG_FUA, q);
+       else
+               queue_flag_clear(QUEUE_FLAG_FUA, q);
+       spin_unlock_irq(q->queue_lock);
+#elif defined(HAVE_BLK_QUEUE_WRITE_CACHE)
+       blk_queue_write_cache(q, wc, fua);
+#elif defined(HAVE_BLK_QUEUE_FLUSH_GPL_ONLY)
+       if (wc)
+               q->flush_flags |= REQ_FLUSH;
+       if (fua)
+               q->flush_flags |= REQ_FUA;
+#elif defined(HAVE_BLK_QUEUE_FLUSH)
+       blk_queue_flush(q, (wc ? REQ_FLUSH : 0) | (fua ? REQ_FUA : 0));
+#else
+       blk_queue_ordered(q, QUEUE_ORDERED_DRAIN, NULL);
+#endif
 }
-#endif /* HAVE_BLK_QUEUE_FLUSH && HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */
+
 /*
  * Most of the blk_* macros were removed in 2.6.36.  Ostensibly this was
  * done to improve readability and allow easier grepping.  However, from
@@ -272,41 +299,121 @@ bio_set_flags_failfast(struct block_device *bdev, int *flags)
  * allow richer semantics to be expressed to the block layer.  It is
  * the block layers responsibility to choose the correct way to
  * implement these semantics.
- *
- * The existence of these flags implies that REQ_FLUSH an REQ_FUA are
- * defined.  Thus we can safely define VDEV_REQ_FLUSH and VDEV_REQ_FUA
- * compatibility macros.
  */
 #ifdef WRITE_FLUSH_FUA
 #define        VDEV_WRITE_FLUSH_FUA            WRITE_FLUSH_FUA
-#define        VDEV_REQ_FLUSH                  REQ_FLUSH
-#define        VDEV_REQ_FUA                    REQ_FUA
 #else
 #define        VDEV_WRITE_FLUSH_FUA            WRITE_BARRIER
-#ifdef HAVE_BIO_RW_BARRIER
-#define        VDEV_REQ_FLUSH                  (1 << BIO_RW_BARRIER)
-#define        VDEV_REQ_FUA                    (1 << BIO_RW_BARRIER)
-#else
-#define        VDEV_REQ_FLUSH                  REQ_HARDBARRIER
-#define        VDEV_REQ_FUA                    REQ_FUA
 #endif
+
+/*
+ * 4.8 - 4.x API,
+ *   REQ_OP_FLUSH
+ *
+ * 4.8-rc0 - 4.8-rc1,
+ *   REQ_PREFLUSH
+ *
+ * 2.6.36 - 4.7 API,
+ *   REQ_FLUSH
+ *
+ * 2.6.x - 2.6.35 API,
+ *   HAVE_BIO_RW_BARRIER
+ *
+ * Used to determine if a cache flush has been requested.  This check has
+ * been left intentionally broad in order to cover both a legacy flush
+ * and the new preflush behavior introduced in Linux 4.8.  This is correct
+ * in all cases but may have a performance impact for some kernels.  It
+ * has the advantage of minimizing kernel specific changes in the zvol code.
+ */
+static inline boolean_t
+bio_is_flush(struct bio *bio)
+{
+#if defined(HAVE_REQ_OP_FLUSH) && defined(HAVE_BIO_BI_OPF)
+       return ((bio_op(bio) == REQ_OP_FLUSH) || (bio->bi_opf & REQ_PREFLUSH));
+#elif defined(REQ_PREFLUSH) && defined(HAVE_BIO_BI_OPF)
+       return (bio->bi_opf & REQ_PREFLUSH);
+#elif defined(REQ_PREFLUSH) && !defined(HAVE_BIO_BI_OPF)
+       return (bio->bi_rw & REQ_PREFLUSH);
+#elif defined(REQ_FLUSH)
+       return (bio->bi_rw & REQ_FLUSH);
+#elif defined(HAVE_BIO_RW_BARRIER)
+       return (bio->bi_rw & (1 << BIO_RW_BARRIER));
+#else
+#error "Allowing the build will cause flush requests to be ignored. Please "
+       "file an issue report at: https://github.com/zfsonlinux/zfs/issues/new"
 #endif
+}
 
 /*
- * 2.6.32 API change
- * Use the normal I/O patch for discards.
+ * 4.8 - 4.x API,
+ *   REQ_FUA flag moved to bio->bi_opf
+ *
+ * 2.6.x - 4.7 API,
+ *   REQ_FUA
  */
-#ifdef QUEUE_FLAG_DISCARD
-#ifdef HAVE_BIO_RW_DISCARD
-#define        VDEV_REQ_DISCARD                (1 << BIO_RW_DISCARD)
+static inline boolean_t
+bio_is_fua(struct bio *bio)
+{
+#if defined(HAVE_BIO_BI_OPF)
+       return (bio->bi_opf & REQ_FUA);
+#elif defined(REQ_FUA)
+       return (bio->bi_rw & REQ_FUA);
 #else
-#define        VDEV_REQ_DISCARD                REQ_DISCARD
+#error "Allowing the build will cause fua requests to be ignored. Please "
+       "file an issue report at: https://github.com/zfsonlinux/zfs/issues/new"
 #endif
+}
+
+/*
+ * 4.8 - 4.x API,
+ *   REQ_OP_DISCARD
+ *
+ * 2.6.36 - 4.7 API,
+ *   REQ_DISCARD
+ *
+ * 2.6.28 - 2.6.35 API,
+ *   BIO_RW_DISCARD
+ *
+ * In all cases the normal I/O path is used for discards.  The only
+ * difference is how the kernel tags individual I/Os as discards.
+ */
+static inline boolean_t
+bio_is_discard(struct bio *bio)
+{
+#if defined(HAVE_REQ_OP_DISCARD)
+       return (bio_op(bio) == REQ_OP_DISCARD);
+#elif defined(REQ_DISCARD)
+       return (bio->bi_rw & REQ_DISCARD);
+#elif defined(HAVE_BIO_RW_DISCARD)
+       return (bio->bi_rw & (1 << BIO_RW_DISCARD));
 #else
 #error "Allowing the build will cause discard requests to become writes "
-       "potentially triggering the DMU_MAX_ACCESS assertion. Please file "
+       "potentially triggering the DMU_MAX_ACCESS assertion. Please file "
        "an issue report at: https://github.com/zfsonlinux/zfs/issues/new"
 #endif
+}
+
+/*
+ * 4.8 - 4.x API,
+ *   REQ_OP_SECURE_ERASE
+ *
+ * 2.6.36 - 4.7 API,
+ *   REQ_SECURE
+ *
+ * 2.6.x - 2.6.35 API,
+ *   Unsupported by kernel
+ */
+static inline boolean_t
+bio_is_secure_erase(struct bio *bio)
+{
+#if defined(HAVE_REQ_OP_SECURE_ERASE)
+       return (bio_op(bio) == REQ_OP_SECURE_ERASE);
+#elif defined(REQ_SECURE)
+       return (bio->bi_rw & REQ_SECURE);
+#else
+       return (0);
+#endif
+}
 
 /*
  * 2.6.33 API change
index bcec1146a0c4cdd6a17e51e6b65c28909d64460f..b4881a6c67fdf768a2ba807ec771016c9107c5b7 100644 (file)
@@ -202,9 +202,6 @@ lseek_execute(
  * At 60 seconds the kernel will also begin issuing RCU stall warnings.
  */
 #include <linux/posix_acl.h>
-#ifndef HAVE_POSIX_ACL_CACHING
-#define        ACL_NOT_CACHED ((void *)(-1))
-#endif /* HAVE_POSIX_ACL_CACHING */
 
 #if defined(HAVE_POSIX_ACL_RELEASE) && !defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY)
 
@@ -233,7 +230,6 @@ zpl_posix_acl_release(struct posix_acl *acl)
 
 static inline void
 zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer) {
-#ifdef HAVE_POSIX_ACL_CACHING
        struct posix_acl *older = NULL;
 
        spin_lock(&ip->i_lock);
@@ -255,7 +251,6 @@ zpl_set_cached_acl(struct inode *ip, int type, struct posix_acl *newer) {
        spin_unlock(&ip->i_lock);
 
        zpl_posix_acl_release(older);
-#endif /* HAVE_POSIX_ACL_CACHING */
 }
 
 static inline void
@@ -320,15 +315,19 @@ typedef umode_t zpl_equivmode_t;
 #else
 typedef mode_t zpl_equivmode_t;
 #endif /* HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T */
-#endif /* CONFIG_FS_POSIX_ACL */
 
-#ifndef HAVE_CURRENT_UMASK
-static inline int
-current_umask(void)
-{
-       return (current->fs->umask);
-}
-#endif /* HAVE_CURRENT_UMASK */
+/*
+ * 4.8 API change,
+ * posix_acl_valid() now must be passed a namespace, the namespace from
+ * from super block associated with the given inode is used for this purpose.
+ */
+#ifdef HAVE_POSIX_ACL_VALID_WITH_NS
+#define        zpl_posix_acl_valid(ip, acl)  posix_acl_valid(ip->i_sb->s_user_ns, acl)
+#else
+#define        zpl_posix_acl_valid(ip, acl)  posix_acl_valid(acl)
+#endif
+
+#endif /* CONFIG_FS_POSIX_ACL */
 
 /*
  * 2.6.38 API change,
index 5e19ea1e5cc95384f707bbf468ec8e544bcb3a66..b1c4293077c8489dc255b37871533f0bee7712b6 100644 (file)
@@ -101,13 +101,26 @@ fn(struct inode *ip, char *list, size_t list_size,                        \
 }
 #endif
 
+/*
+ * 4.7 API change,
+ * The xattr_handler->get() callback was changed to take a both dentry and
+ * inode, because the dentry might not be attached to an inode yet.
+ */
+#if defined(HAVE_XATTR_GET_DENTRY_INODE)
+#define        ZPL_XATTR_GET_WRAPPER(fn)                                       \
+static int                                                             \
+fn(const struct xattr_handler *handler, struct dentry *dentry,         \
+    struct inode *inode, const char *name, void *buffer, size_t size)  \
+{                                                                      \
+       return (__ ## fn(inode, name, buffer, size));                   \
+}
 /*
  * 4.4 API change,
  * 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.
  */
-#if defined(HAVE_XATTR_GET_HANDLER)
+#elif defined(HAVE_XATTR_GET_HANDLER)
 #define        ZPL_XATTR_GET_WRAPPER(fn)                                       \
 static int                                                             \
 fn(const struct xattr_handler *handler, struct dentry *dentry,         \
@@ -140,13 +153,27 @@ fn(struct inode *ip, const char *name, void *buffer, size_t size) \
 }
 #endif
 
+/*
+ * 4.7 API change,
+ * The xattr_handler->set() callback was changed to take a both dentry and
+ * inode, because the dentry might not be attached to an inode yet.
+ */
+#if defined(HAVE_XATTR_SET_DENTRY_INODE)
+#define        ZPL_XATTR_SET_WRAPPER(fn)                                       \
+static int                                                             \
+fn(const struct xattr_handler *handler, struct dentry *dentry,         \
+    struct inode *inode, const char *name, const void *buffer,         \
+    size_t size, int flags)                                            \
+{                                                                      \
+       return (__ ## fn(inode, name, buffer, size, flags));            \
+}
 /*
  * 4.4 API change,
  * 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.
  */
-#if defined(HAVE_XATTR_SET_HANDLER)
+#elif defined(HAVE_XATTR_SET_HANDLER)
 #define        ZPL_XATTR_SET_WRAPPER(fn)                                       \
 static int                                                             \
 fn(const struct xattr_handler *handler, struct dentry *dentry,         \
index d997dc4cf15877972aeb7fcc6aad7ec0855b3754..708064b843d3c9c41de03525111283777769e39a 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index d6da5dcfdb9f8472ae3eff9f6d3bb09c7dce5688..da6f21c2eeff0012da8bb3434c3757e0dbd37db5 100644 (file)
@@ -221,6 +221,7 @@ int dsl_dataset_own_obj(struct dsl_pool *dp, uint64_t dsobj,
 void dsl_dataset_disown(dsl_dataset_t *ds, void *tag);
 void dsl_dataset_name(dsl_dataset_t *ds, char *name);
 boolean_t dsl_dataset_tryown(dsl_dataset_t *ds, void *tag);
+int dsl_dataset_namelen(dsl_dataset_t *ds);
 uint64_t dsl_dataset_create_sync(dsl_dir_t *pds, const char *lastname,
     dsl_dataset_t *origin, uint64_t flags, cred_t *, dmu_tx_t *);
 uint64_t dsl_dataset_create_sync_dd(dsl_dir_t *dd, dsl_dataset_t *origin,
index 1f556484deb00952931ead9c3ed5f0281ec99068..647ae309cca437a0d04e02f2e936b5cced245611 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 22352550af4df8896a6ad31dd86179c5a438f577..39e2fa2d7cbf4f9f9800fd831b1d1d4d20b87695 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index a96c569130833a96fcd7d491f095fbb753d86fa7..22a0f8ff78c84fe8d8c8892586a2b7ab74abbdf9 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 4da144c724abcadd6091caf17b50a1184fbe0042..57bf55f9365f5a8ce20da4b5549c1d3b85f7d3bb 100644 (file)
@@ -69,6 +69,7 @@ typedef enum dmu_objset_type {
 #define        ZAP_MAXNAMELEN 256
 #define        ZAP_MAXVALUELEN (1024 * 8)
 #define        ZAP_OLDMAXVALUELEN 1024
+#define        ZFS_MAX_DATASET_NAME_LEN 256
 
 /*
  * Dataset properties are identified by these constants and must be added to
index 5dc9084dad6b5a5479abe399072db0d300e6ce33..bfd2e7902ea3cc52178d8e122c1c013533cfa702 100644 (file)
@@ -446,6 +446,10 @@ _NOTE(CONSTCOND) } while (0)
        ((zc1).zc_word[2] - (zc2).zc_word[2]) | \
        ((zc1).zc_word[3] - (zc2).zc_word[3])))
 
+#define        ZIO_CHECKSUM_IS_ZERO(zc) \
+       (0 == ((zc)->zc_word[0] | (zc)->zc_word[1] | \
+       (zc)->zc_word[2] | (zc)->zc_word[3]))
+
 #define        DVA_IS_VALID(dva)       (DVA_GET_ASIZE(dva) != 0)
 
 #define        ZIO_SET_CHECKSUM(zcp, w0, w1, w2, w3)   \
index b94cb79c656a82232268ae3c92192574c861c37f..a656869cc684abd9309f75459ac95dc031875aec 100644 (file)
@@ -64,7 +64,6 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
            __field(uint32_t,           z_sync_cnt)
            __field(mode_t,             z_mode)
            __field(boolean_t,          z_is_sa)
-           __field(boolean_t,          z_is_zvol)
            __field(boolean_t,          z_is_mapped)
            __field(boolean_t,          z_is_ctldir)
            __field(boolean_t,          z_is_stale)
@@ -104,7 +103,6 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
            __entry->z_sync_cnt         = zn->z_sync_cnt;
            __entry->z_mode             = zn->z_mode;
            __entry->z_is_sa            = zn->z_is_sa;
-           __entry->z_is_zvol          = zn->z_is_zvol;
            __entry->z_is_mapped        = zn->z_is_mapped;
            __entry->z_is_ctldir        = zn->z_is_ctldir;
            __entry->z_is_stale         = zn->z_is_stale;
@@ -128,7 +126,7 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
            "zn_prefetch %u moved %u blksz %u seq %u "
            "mapcnt %llu gen %llu size %llu atime 0x%llx:0x%llx "
            "links %llu pflags %llu uid %llu gid %llu "
-           "sync_cnt %u mode 0x%x is_sa %d is_zvol %d "
+           "sync_cnt %u mode 0x%x is_sa %d "
            "is_mapped %d is_ctldir %d is_stale %d inode { "
            "ino %lu nlink %u version %llu size %lli blkbits %u "
            "bytes %u mode 0x%x generation %x } } ace { type %u "
@@ -139,7 +137,7 @@ DECLARE_EVENT_CLASS(zfs_ace_class,
            __entry->z_size, __entry->z_atime[0], __entry->z_atime[1],
            __entry->z_links, __entry->z_pflags, __entry->z_uid,
            __entry->z_gid, __entry->z_sync_cnt, __entry->z_mode,
-           __entry->z_is_sa, __entry->z_is_zvol, __entry->z_is_mapped,
+           __entry->z_is_sa, __entry->z_is_mapped,
            __entry->z_is_ctldir, __entry->z_is_stale, __entry->i_ino,
            __entry->i_nlink, __entry->i_version, __entry->i_size,
            __entry->i_blkbits, __entry->i_bytes, __entry->i_mode,
index d5a1889d2a26f31bed58b9095b63e03613c77746..cf8028d2aca53caec52315da76ea4d18253aef48 100644 (file)
@@ -38,7 +38,7 @@ typedef struct vdev_disk {
 } vdev_disk_t;
 
 extern int vdev_disk_physio(struct block_device *, caddr_t,
-                           size_t, uint64_t, int);
+                           size_t, uint64_t, int, int);
 extern int vdev_disk_read_rootlabel(char *, char *, nvlist_t **);
 
 #endif /* _KERNEL */
index ea5e4036929197bd4cda21046700c5ad387d2492..5322f3bc73af3350a46a824d0561c5fcd26ceb47 100644 (file)
@@ -32,7 +32,9 @@ extern "C" {
 
 #ifdef _KERNEL
 
-#include <sys/zfs_znode.h>
+#include <sys/list.h>
+#include <sys/avl.h>
+#include <sys/condvar.h>
 
 typedef enum {
        RL_READER,
@@ -40,8 +42,16 @@ typedef enum {
        RL_APPEND
 } rl_type_t;
 
+typedef struct zfs_rlock {
+       kmutex_t zr_mutex;      /* protects changes to zr_avl */
+       avl_tree_t zr_avl;      /* avl tree of range locks */
+       uint64_t *zr_size;      /* points to znode->z_size */
+       uint_t *zr_blksz;       /* points to znode->z_blksz */
+       uint64_t *zr_max_blksz; /* points to zsb->z_max_blksz */
+} zfs_rlock_t;
+
 typedef struct rl {
-       znode_t *r_zp;          /* znode this lock applies to */
+       zfs_rlock_t *r_zrl;
        avl_node_t r_node;      /* avl node link */
        uint64_t r_off;         /* file range offset */
        uint64_t r_len;         /* file range length */
@@ -61,7 +71,8 @@ typedef struct rl {
  * is converted to RL_WRITER that specified to lock from the start of the
  * end of file.  Returns the range lock structure.
  */
-rl_t *zfs_range_lock(znode_t *zp, uint64_t off, uint64_t len, rl_type_t type);
+rl_t *zfs_range_lock(zfs_rlock_t *zrl, uint64_t off, uint64_t len,
+    rl_type_t type);
 
 /* Unlock range and destroy range lock structure. */
 void zfs_range_unlock(rl_t *rl);
@@ -78,6 +89,23 @@ void zfs_range_reduce(rl_t *rl, uint64_t off, uint64_t len);
  */
 int zfs_range_compare(const void *arg1, const void *arg2);
 
+static inline void
+zfs_rlock_init(zfs_rlock_t *zrl)
+{
+       mutex_init(&zrl->zr_mutex, NULL, MUTEX_DEFAULT, NULL);
+       avl_create(&zrl->zr_avl, zfs_range_compare,
+           sizeof (rl_t), offsetof(rl_t, r_node));
+       zrl->zr_size = NULL;
+       zrl->zr_blksz = NULL;
+       zrl->zr_max_blksz = NULL;
+}
+
+static inline void
+zfs_rlock_destroy(zfs_rlock_t *zrl)
+{
+       avl_destroy(&zrl->zr_avl);
+       mutex_destroy(&zrl->zr_mutex);
+}
 #endif /* _KERNEL */
 
 #ifdef __cplusplus
index c03bef5c7d6453e32f95e4f9560f82a728254e8c..32ffe07d28563558282e6da0e4c00d2c25ee4164 100644 (file)
@@ -37,6 +37,7 @@
 #include <sys/rrwlock.h>
 #include <sys/zfs_sa.h>
 #include <sys/zfs_stat.h>
+#include <sys/zfs_rlock.h>
 #endif
 #include <sys/zfs_acl.h>
 #include <sys/zil.h>
@@ -187,8 +188,7 @@ typedef struct znode {
        krwlock_t       z_parent_lock;  /* parent lock for directories */
        krwlock_t       z_name_lock;    /* "master" lock for dirent locks */
        zfs_dirlock_t   *z_dirlocks;    /* directory entry lock list */
-       kmutex_t        z_range_lock;   /* protects changes to z_range_avl */
-       avl_tree_t      z_range_avl;    /* avl tree of file range locks */
+       zfs_rlock_t     z_range_lock;   /* file range lock */
        uint8_t         z_unlinked;     /* file has been unlinked */
        uint8_t         z_atime_dirty;  /* atime needs to be synced */
        uint8_t         z_zn_prefetch;  /* Prefetch znodes? */
@@ -209,11 +209,9 @@ typedef struct znode {
        zfs_acl_t       *z_acl_cached;  /* cached acl */
        krwlock_t       z_xattr_lock;   /* xattr data lock */
        nvlist_t        *z_xattr_cached; /* cached xattrs */
-       struct znode    *z_xattr_parent; /* xattr parent znode */
        list_node_t     z_link_node;    /* all znodes in fs link */
        sa_handle_t     *z_sa_hdl;      /* handle to sa data */
        boolean_t       z_is_sa;        /* are we native sa? */
-       boolean_t       z_is_zvol;      /* are we used by the zvol */
        boolean_t       z_is_mapped;    /* are we mmap'ed */
        boolean_t       z_is_ctldir;    /* are we .zfs entry */
        boolean_t       z_is_stale;     /* are we stale due to rollback? */
index 54b35e02de74f194e50aabbc0f0e874b9158e71d..c6085481bb32c62a953f023944b92d3f22a9d37b 100644 (file)
@@ -123,7 +123,7 @@ extern const struct inode_operations zpl_ops_snapdirs;
 extern const struct file_operations zpl_fops_shares;
 extern const struct inode_operations zpl_ops_shares;
 
-#ifdef HAVE_VFS_ITERATE
+#if defined(HAVE_VFS_ITERATE) || defined(HAVE_VFS_ITERATE_SHARED)
 
 #define        DIR_CONTEXT_INIT(_dirent, _actor, _pos) {       \
        .actor = _actor,                                \
index d29ccfbd0b2dd1961f0ae8e7ddff026e5d04dfed..b2e1ae4baa6510a4a37425ce5982331e344eb849 100644 (file)
@@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index e018aa2271908b326bbd09dd24d6d15a1f7ba6e9..c382c85b7f52707f81124d70a5cd8c3ed98115c6 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 9987c3753ddeaf0b7e8293766c3b86e8ad82af50..410969c74ecba33e7b128b2ef1ec8cf6e018242b 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 639424322b3fb63d894a8ea02eb022652c1eb532..0aa20ade2ddf971564df1f3811434c07328df5ec 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 17d2a50e4ba812aa12029c7febf4707131e7f4d8..27710476daabf555e3cb5e25cb427939088bd92c 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index a141ed7772cb58edafaa8c868f8aa827806a49bb..dc63622892fa7037bb48881b0090e31f616fef70 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 677332ab949f65c1192c3fade9f353b0d134042b..6da7fa1e711cf8b8cf9de1521d4d9b5f270a32a7 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 69edd0af0e6a9f83fef116664fde58f443114cad..13a803998a63d57122f98db4f2e9d4c8c176ee8d 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 972d265896900f181d1812a309f3476069855566..fd0c9ac9941c655b60e1a54cdbbecd648fcdc877 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 102317d433022de2216afcd3ebc13af36a1bca02..b7be635dc933b374d96464b61359805d8ec9fbb3 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 1305ba7722b34f055c04e94b46d3eeaea982b650..6b0fef9aa6a3507132a6871799abc249ae610a26 100644 (file)
@@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index dfbde3077ce5580aa64a0727157356acc3f64a5f..ec67679d13b56116b2f3ccef6f85b858ce4b042e 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 0b087cecdaea4494f980370a1b785c2467a8c693..89b3e7b87c72c5a4273766f1d3a2ccdeb0f1d955 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index e226197e6de5fac135b41f0a68922511f61da354..8851be1b3342ed23d9683d7f88e9b03291ffa6ec 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 425d4ea11e4e7a6134683783da1e78b9291c58c1..8ba2d634dd71b6fe761e25b30404f2162fcd46df 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index be96252cc87595f47438b5707baa2fc5ed27f340..1f5ea91f76eca435056f0791e6bba7edec05db17 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 3bc8f047781a42add2e2f4676de9de2c26dbdf7b..bb6a837768aba57fe8fb902f26a5357bd766ebf4 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index afebe96c94b47d0412441b118f029789c9f5f359..cd3b81f2f2469c685c0eb3e86cbfbd668d0c09a7 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 6ef1a43a190c189f370873cb36f50f07d26d8264..ad56e9384d547578a03d0ccdb7a3567a6664add5 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index d9a989ebfc16dd7cd360e07f2011c041622ebb03..f30f47989ab5c3a0db4c3a717354f97d06a300e5 100644 (file)
@@ -52,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -102,6 +103,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index ee6f0a47c9b9fca99db457ac51e1f4e3577d3f9b..f031e4c7e6d9f297e5bc616650d3bc80f4ff6838 100644 (file)
@@ -5,7 +5,7 @@ includedir=${prefix}/include
 
 Name: libzfs
 Description: LibZFS library
-Version: 0.6.5.7
+Version: 0.6.5.8
 URL: http://zfsonlinux.org
 Requires: libzfs_core
 Cflags: -I${includedir}/libzfs -I${includedir}/libspl
index b59c0e45e9ec1600ae0f48fab31edba3987c89e8..9869d0f75cf54e498293dbb0d872e3bf1411af79 100644 (file)
@@ -5,7 +5,7 @@ includedir=${prefix}/include
 
 Name: libzfs_core
 Description: LibZFS core library
-Version: 0.6.5.7
+Version: 0.6.5.8
 URL: http://zfsonlinux.org
 Cflags: -I${includedir}/libzfs -I${includedir}/libspl
 Libs: -L${libdir} -lzfs_core
index 088ee35c4f6b2a14ce7fd83e7313a3c85d994444..dde1a9a0fca6cef50b7f99023f3d13d85c7f4825 100644 (file)
@@ -3889,7 +3889,6 @@ zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive,
        }
 
        if (recursive) {
-
                parentname = zfs_strdup(zhp->zfs_hdl, zhp->zfs_name);
                if (parentname == NULL) {
                        ret = -1;
@@ -3902,8 +3901,7 @@ zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive,
                        ret = -1;
                        goto error;
                }
-
-       } else {
+       } else if (zhp->zfs_type != ZFS_TYPE_SNAPSHOT) {
                if ((cl = changelist_gather(zhp, ZFS_PROP_NAME, 0,
                    force_unmount ? MS_FORCE : 0)) == NULL)
                        return (-1);
@@ -3952,23 +3950,23 @@ zfs_rename(zfs_handle_t *zhp, const char *target, boolean_t recursive,
                 * On failure, we still want to remount any filesystems that
                 * were previously mounted, so we don't alter the system state.
                 */
-               if (!recursive)
+               if (cl != NULL)
                        (void) changelist_postfix(cl);
        } else {
-               if (!recursive) {
+               if (cl != NULL) {
                        changelist_rename(cl, zfs_get_name(zhp), target);
                        ret = changelist_postfix(cl);
                }
        }
 
 error:
-       if (parentname) {
+       if (parentname != NULL) {
                free(parentname);
        }
-       if (zhrp) {
+       if (zhrp != NULL) {
                zfs_close(zhrp);
        }
-       if (cl) {
+       if (cl != NULL) {
                changelist_free(cl);
        }
        return (ret);
index e40f6f6947f58464cc24cd42febc078bc334b2b4..d0df9e3c2a13a4948b8b52f0c7a4e0d80f7d6310 100644 (file)
@@ -221,7 +221,7 @@ fix_paths(nvlist_t *nv, name_entry_t *names)
                        }
 
                        /* Prefer paths earlier in the search order. */
-                       if (best->ne_num_labels == best->ne_num_labels &&
+                       if (ne->ne_num_labels == best->ne_num_labels &&
                            ne->ne_order < best->ne_order) {
                                best = ne;
                                continue;
index c01ec105e4a42746a6eeb13c1a8658c90d98bc34..bd874e480f811a8813135e82eb246feafefbce4f 100644 (file)
@@ -21,6 +21,7 @@
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014 by Delphix. All rights reserved.
  */
 
 /*
@@ -744,13 +745,6 @@ zfs_share_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto)
        if (!zfs_is_mountable(zhp, mountpoint, sizeof (mountpoint), NULL))
                return (0);
 
-       if ((ret = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) {
-               (void) zfs_error_fmt(hdl, EZFS_SHARENFSFAILED,
-                   dgettext(TEXT_DOMAIN, "cannot share '%s': %s"),
-                   zfs_get_name(zhp), sa_errorstr(ret));
-               return (-1);
-       }
-
        for (curr_proto = proto; *curr_proto != PROTO_END; curr_proto++) {
                /*
                 * Return success if there are no share options.
@@ -761,6 +755,14 @@ zfs_share_proto(zfs_handle_t *zhp, zfs_share_proto_t *proto)
                    strcmp(shareopts, "off") == 0)
                        continue;
 
+               ret = zfs_init_libshare(hdl, SA_INIT_SHARE_API);
+               if (ret != SA_OK) {
+                       (void) zfs_error_fmt(hdl, EZFS_SHARENFSFAILED,
+                           dgettext(TEXT_DOMAIN, "cannot share '%s': %s"),
+                           zfs_get_name(zhp), sa_errorstr(ret));
+                       return (-1);
+               }
+
                /*
                 * If the 'zoned' property is set, then zfs_is_mountable()
                 * will have already bailed out if we are in the global zone.
@@ -1072,7 +1074,7 @@ libzfs_dataset_cmp(const void *a, const void *b)
        if (gotb)
                return (1);
 
-       return (strcmp(zfs_get_name(a), zfs_get_name(b)));
+       return (strcmp(zfs_get_name(*za), zfs_get_name(*zb)));
 }
 
 /*
index a194b8b57e284b4d0c52d298e57a52245c61cc76..da980cfd4f415b532ebebc0e36452286a8e915a4 100644 (file)
@@ -1891,7 +1891,12 @@ zpool_import_props(libzfs_handle_t *hdl, nvlist_t *config, const char *newname,
                            "one or more devices are already in use\n"));
                        (void) zfs_error(hdl, EZFS_BADDEV, desc);
                        break;
-
+               case ENAMETOOLONG:
+                       zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+                           "new name of at least one dataset is longer than "
+                           "the maximum allowable length"));
+                       (void) zfs_error(hdl, EZFS_NAMETOOLONG, desc);
+                       break;
                default:
                        (void) zpool_standard_error(hdl, error, desc);
                        zpool_explain_recover(hdl,
old mode 100644 (file)
new mode 100755 (executable)
index ccace2d..56dfd95
@@ -1352,7 +1352,8 @@ zprop_print_one_property(const char *name, zprop_get_cbdata_t *cbp,
                        continue;
                }
 
-               if (cbp->cb_columns[i + 1] == GET_COL_NONE)
+               if (i == (ZFS_GET_NCOLS - 1) ||
+                   cbp->cb_columns[i + 1] == GET_COL_NONE)
                        (void) printf("%s", str);
                else if (cbp->cb_scripted)
                        (void) printf("%s\t", str);
index 5f1a2f98877b330af641402b0e2a157562573924..06f448ebb3382da9cc1fda207cfad97f268547a3 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 4f58907bf0638fce02d4398a9380b7ddc9f0b8a3..a4ceaf5c4cf307bdc248a37ee7dd223a758bbc9e 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 3ebd799434c78f40f24499a970a8e3f544cf8819..fcd6e60ecbe6ede89c6ab4f10daf8304c1ac5220 100644 (file)
@@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 8e87b29fca04357d2856a588ed82b4115c39e551..3208853f5b13be87e7d7e980cfbb91da7d7d4048 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 078599bd6419e21465a9ca109a9838f9547b9c83..5a5288dca28c40ea483e6c0fefea8a9be797005a 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index bce26fa9d284666424b968d26e4684f385e9f1b4..23f7efaec00f2f1528e69fd6c08041da784438ac 100644 (file)
@@ -24,6 +24,19 @@ Description of the different parameters to the ZFS module.
 .sp
 .LP
 
+.sp
+.ne 2
+.na
+\fBignore_hole_birth\fR (int)
+.ad
+.RS 12n
+When set, the hole_birth optimization will not be used, and all holes will
+always be sent on zfs send. Useful if you suspect your datasets are affected
+by a bug in hole_birth.
+.sp
+Use \fB1\fR (default) for on and \fB0\fR for off.
+.RE
+
 .sp
 .ne 2
 .na
index 499bf3801af96b5938339c34eba9b599dc7b687d..a29ef5faba227f3f940b98f9462d7eaa3ae0dfc7 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
diff --git a/module/avl/zavl.mod.c b/module/avl/zavl.mod.c
deleted file mode 100644 (file)
index 062c559..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
-       { 0x51198477, "module_layout" },
-       { 0xbc32eee7, "spl_panic" },
-       { 0xe52592a, "panic" },
-       { 0xb4390f9a, "mcount" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=spl";
-
-
-MODULE_INFO(srcversion, "C188A8AF7758C6D5506AE88");
index 1eca0feea7691c0ef7a5c309a7c8441d2fe0655f..16a0fc3eb571c68b51ddf98a7f474df0a1b9ff14 100644 (file)
@@ -21,6 +21,7 @@
 
 /*
  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016 by Delphix. All rights reserved.
  */
 
 #include <sys/stropts.h>
@@ -138,6 +139,11 @@ static int nvlist_add_common(nvlist_t *nvl, const char *name, data_type_t type,
 #define        NVPAIR2I_NVP(nvp) \
        ((i_nvp_t *)((size_t)(nvp) - offsetof(i_nvp_t, nvi_nvp)))
 
+#ifdef _KERNEL
+int nvpair_max_recursion = 20;
+#else
+int nvpair_max_recursion = 100;
+#endif
 
 int
 nv_alloc_init(nv_alloc_t *nva, const nv_alloc_ops_t *nvo, /* args */ ...)
@@ -2017,6 +2023,7 @@ typedef struct {
        const nvs_ops_t *nvs_ops;
        void            *nvs_private;
        nvpriv_t        *nvs_priv;
+       int             nvs_recursion;
 } nvstream_t;
 
 /*
@@ -2168,9 +2175,16 @@ static int
 nvs_embedded(nvstream_t *nvs, nvlist_t *embedded)
 {
        switch (nvs->nvs_op) {
-       case NVS_OP_ENCODE:
-               return (nvs_operation(nvs, embedded, NULL));
+       case NVS_OP_ENCODE: {
+               int err;
 
+               if (nvs->nvs_recursion >= nvpair_max_recursion)
+                       return (EINVAL);
+               nvs->nvs_recursion++;
+               err = nvs_operation(nvs, embedded, NULL);
+               nvs->nvs_recursion--;
+               return (err);
+       }
        case NVS_OP_DECODE: {
                nvpriv_t *priv;
                int err;
@@ -2183,8 +2197,12 @@ nvs_embedded(nvstream_t *nvs, nvlist_t *embedded)
 
                nvlist_init(embedded, embedded->nvl_nvflag, priv);
 
+               if (nvs->nvs_recursion >= nvpair_max_recursion)
+                       return (EINVAL);
+               nvs->nvs_recursion++;
                if ((err = nvs_operation(nvs, embedded, NULL)) != 0)
                        nvlist_free(embedded);
+               nvs->nvs_recursion--;
                return (err);
        }
        default:
@@ -2272,6 +2290,7 @@ nvlist_common(nvlist_t *nvl, char *buf, size_t *buflen, int encoding,
                return (EINVAL);
 
        nvs.nvs_op = nvs_op;
+       nvs.nvs_recursion = 0;
 
        /*
         * For NVS_OP_ENCODE and NVS_OP_DECODE make sure an nvlist and
diff --git a/module/nvpair/znvpair.mod.c b/module/nvpair/znvpair.mod.c
deleted file mode 100644 (file)
index 9c37d77..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
-       { 0x51198477, "module_layout" },
-       { 0x349cba85, "strchr" },
-       { 0x25ec1b28, "strlen" },
-       { 0xab140103, "spl_kmem_alloc" },
-       { 0xbc32eee7, "spl_panic" },
-       { 0xe2d5255a, "strcmp" },
-       { 0xde0bdcff, "memset" },
-       { 0xb4390f9a, "mcount" },
-       { 0x85abc85f, "strncmp" },
-       { 0xdae80439, "spl_vmem_alloc" },
-       { 0x82fe53e1, "ddi_strtol" },
-       { 0xddd4a3d3, "xdrmem_create" },
-       { 0xa3a5be95, "memmove" },
-       { 0x80c3f220, "spl_kmem_free" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=spl";
-
-
-MODULE_INFO(srcversion, "3BD67F56FE7BC46673DD6A6");
diff --git a/module/unicode/zunicode.mod.c b/module/unicode/zunicode.mod.c
deleted file mode 100644 (file)
index 88cda5e..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
-       { 0x51198477, "module_layout" },
-       { 0x25ec1b28, "strlen" },
-       { 0xe2d5255a, "strcmp" },
-       { 0xb4390f9a, "mcount" },
-       { 0x85abc85f, "strncmp" },
-       { 0xf0fdf6cb, "__stack_chk_fail" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=";
-
-
-MODULE_INFO(srcversion, "5DC8CE3A830A36341CDAF7F");
diff --git a/module/zcommon/zcommon.mod.c b/module/zcommon/zcommon.mod.c
deleted file mode 100644 (file)
index 465d241..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
-       { 0x51198477, "module_layout" },
-       { 0x4c4fef19, "kernel_stack" },
-       { 0x25ec1b28, "strlen" },
-       { 0xab140103, "spl_kmem_alloc" },
-       { 0x167e7f9d, "__get_user_1" },
-       { 0xbc32eee7, "spl_panic" },
-       { 0xe2d5255a, "strcmp" },
-       { 0x4f8b5ddb, "_copy_to_user" },
-       { 0xee8843fa, "nvpair_value_uint64" },
-       { 0x11089ac7, "_ctype" },
-       { 0xa1c76e0a, "_cond_resched" },
-       { 0xb4390f9a, "mcount" },
-       { 0x85abc85f, "strncmp" },
-       { 0x9ca95a0e, "sort" },
-       { 0xd42a96fa, "nvpair_name" },
-       { 0x1bfac311, "nvlist_lookup_nvlist" },
-       { 0x5d6e0bba, "nvlist_lookup_uint64" },
-       { 0xd0920999, "nvpair_value_uint32" },
-       { 0x29c88b11, "nvlist_next_nvpair" },
-       { 0x82027a4c, "cmn_err" },
-       { 0x50720c5f, "snprintf" },
-       { 0xec1cce40, "nvlist_lookup_nvlist_array" },
-       { 0xa3a5be95, "memmove" },
-       { 0x80c3f220, "spl_kmem_free" },
-       { 0x4f6b400b, "_copy_from_user" },
-       { 0xa66a6969, "nvpair_value_nvlist" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=spl,znvpair";
-
-
-MODULE_INFO(srcversion, "D94B05FC2B3769899B59647");
index c53c01ea4be968023f31b902848e31461db31c03..04fde6c167893130ba737eb1aa7e2e8c66a0ae8d 100644 (file)
@@ -1451,6 +1451,13 @@ arc_buf_info(arc_buf_t *ab, arc_buf_info_t *abi, int state_index)
        l2arc_buf_hdr_t *l2hdr = NULL;
        arc_state_t *state = NULL;
 
+       memset(abi, 0, sizeof (arc_buf_info_t));
+
+       if (hdr == NULL)
+               return;
+
+       abi->abi_flags = hdr->b_flags;
+
        if (HDR_HAS_L1HDR(hdr)) {
                l1hdr = &hdr->b_l1hdr;
                state = l1hdr->b_state;
@@ -1458,9 +1465,6 @@ arc_buf_info(arc_buf_t *ab, arc_buf_info_t *abi, int state_index)
        if (HDR_HAS_L2HDR(hdr))
                l2hdr = &hdr->b_l2hdr;
 
-       memset(abi, 0, sizeof (arc_buf_info_t));
-       abi->abi_flags = hdr->b_flags;
-
        if (l1hdr) {
                abi->abi_datacnt = l1hdr->b_datacnt;
                abi->abi_access = l1hdr->b_arc_access;
@@ -2697,12 +2701,7 @@ arc_prune_task(void *ptr)
        if (func != NULL)
                func(ap->p_adjust, ap->p_private);
 
-       /* Callback unregistered concurrently with execution */
-       if (refcount_remove(&ap->p_refcnt, func) == 0) {
-               ASSERT(!list_link_active(&ap->p_node));
-               refcount_destroy(&ap->p_refcnt);
-               kmem_free(ap, sizeof (*ap));
-       }
+       refcount_remove(&ap->p_refcnt, func);
 }
 
 /*
@@ -4320,17 +4319,11 @@ top:
 
                /*
                 * Gracefully handle a damaged logical block size as a
-                * checksum error by passing a dummy zio to the done callback.
+                * checksum error.
                 */
                if (size > spa_maxblocksize(spa)) {
-                       if (done) {
-                               rzio = zio_null(pio, spa, NULL,
-                                   NULL, NULL, zio_flags);
-                               rzio->io_error = ECKSUM;
-                               done(rzio, buf, private);
-                               zio_nowait(rzio);
-                       }
-                       rc = ECKSUM;
+                       ASSERT3P(buf, ==, NULL);
+                       rc = SET_ERROR(ECKSUM);
                        goto out;
                }
 
@@ -4568,13 +4561,19 @@ arc_add_prune_callback(arc_prune_func_t *func, void *private)
 void
 arc_remove_prune_callback(arc_prune_t *p)
 {
+       boolean_t wait = B_FALSE;
        mutex_enter(&arc_prune_mtx);
        list_remove(&arc_prune_list, p);
-       if (refcount_remove(&p->p_refcnt, &arc_prune_list) == 0) {
-               refcount_destroy(&p->p_refcnt);
-               kmem_free(p, sizeof (*p));
-       }
+       if (refcount_remove(&p->p_refcnt, &arc_prune_list) > 0)
+               wait = B_TRUE;
        mutex_exit(&arc_prune_mtx);
+
+       /* wait for arc_prune_task to finish */
+       if (wait)
+               taskq_wait_outstanding(arc_prune_taskq, 0);
+       ASSERT0(refcount_count(&p->p_refcnt));
+       refcount_destroy(&p->p_refcnt);
+       kmem_free(p, sizeof (*p));
 }
 
 void
@@ -5250,7 +5249,7 @@ arc_tuning_update(void)
                arc_c_max = zfs_arc_max;
                arc_c = arc_c_max;
                arc_p = (arc_c >> 1);
-               arc_meta_limit = MIN(arc_meta_limit, arc_c_max);
+               arc_meta_limit = MIN(arc_meta_limit, (3 * arc_c_max) / 4);
        }
 
        /* Valid range: 32M - <arc_c_max> */
index d340da821fc50f0e65bf34acea66383b0be42804..483067cc7ba45101c4b497d1bd131816c7270c4f 100644 (file)
@@ -2628,6 +2628,22 @@ dbuf_sync_leaf(dbuf_dirty_record_t *dr, dmu_tx_t *tx)
 
        if (db->db_blkid == DMU_SPILL_BLKID) {
                mutex_enter(&dn->dn_mtx);
+               if (!(dn->dn_phys->dn_flags & DNODE_FLAG_SPILL_BLKPTR)) {
+                       /*
+                        * In the previous transaction group, the bonus buffer
+                        * was entirely used to store the attributes for the
+                        * dnode which overrode the dn_spill field.  However,
+                        * when adding more attributes to the file a spill
+                        * block was required to hold the extra attributes.
+                        *
+                        * Make sure to clear the garbage left in the dn_spill
+                        * field from the previous attributes in the bonus
+                        * buffer.  Otherwise, after writing out the spill
+                        * block to the new allocated dva, it will free
+                        * the old block pointed to by the invalid dn_spill.
+                        */
+                       db->db_blkptr = NULL;
+               }
                dn->dn_phys->dn_flags |= DNODE_FLAG_SPILL_BLKPTR;
                mutex_exit(&dn->dn_mtx);
        }
index afdf828ed54262287939ba02d2d3729f2cb4cbca..6f39f80e563a52f5db627b299c5797b9ad98d6dd 100644 (file)
@@ -148,7 +148,6 @@ dbuf_stats_hash_table_data(char *buf, size_t size, void *data)
                }
 
                mutex_enter(&db->db_mtx);
-               mutex_exit(DBUF_HASH_MUTEX(h, dsh->idx));
 
                if (db->db_state != DB_EVICTING) {
                        length = __dbuf_stats_hash_table_data(buf, size, db);
@@ -157,7 +156,6 @@ dbuf_stats_hash_table_data(char *buf, size_t size, void *data)
                }
 
                mutex_exit(&db->db_mtx);
-               mutex_enter(DBUF_HASH_MUTEX(h, dsh->idx));
        }
        mutex_exit(DBUF_HASH_MUTEX(h, dsh->idx));
 
index cdb29b622182ce16803931df782303678703ef06..a58f77f082f3dc491d8727701745ac69510c6fe5 100644 (file)
@@ -39,6 +39,7 @@
 #include <sys/zfeature.h>
 
 int32_t zfs_pd_bytes_max = 50 * 1024 * 1024;   /* 50MB */
+int32_t ignore_hole_birth = 1;
 
 typedef struct prefetch_data {
        kmutex_t pd_mtx;
@@ -250,7 +251,7 @@ traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp,
                 *
                 * Note that the meta-dnode cannot be reallocated.
                 */
-               if ((!td->td_realloc_possible ||
+               if (!ignore_hole_birth && (!td->td_realloc_possible ||
                        zb->zb_object == DMU_META_DNODE_OBJECT) &&
                        td->td_hole_birth_enabled_txg <= td->td_min_txg)
                        return (0);
@@ -692,4 +693,7 @@ EXPORT_SYMBOL(traverse_pool);
 
 module_param(zfs_pd_bytes_max, int, 0644);
 MODULE_PARM_DESC(zfs_pd_bytes_max, "Max number of bytes to prefetch");
+
+module_param(ignore_hole_birth, int, 0644);
+MODULE_PARM_DESC(ignore_hole_birth, "Ignore hole_birth txg for send");
 #endif
index a06388566e4f93f6039d810c4ef4c3f1a5831eb7..7124f3d6a83c23e9aacf5864b418028c2629fae6 100644 (file)
@@ -665,6 +665,17 @@ dsl_dataset_name(dsl_dataset_t *ds, char *name)
        }
 }
 
+int
+dsl_dataset_namelen(dsl_dataset_t *ds)
+{
+       int len;
+       VERIFY0(dsl_dataset_get_snapname(ds));
+       mutex_enter(&ds->ds_lock);
+       len = dsl_dir_namelen(ds->ds_dir) + 1 + strlen(ds->ds_snapname);
+       mutex_exit(&ds->ds_lock);
+       return (len);
+}
+
 void
 dsl_dataset_rele(dsl_dataset_t *ds, void *tag)
 {
old mode 100644 (file)
new mode 100755 (executable)
index ada0eac..cf5259a
@@ -182,12 +182,20 @@ dsl_pool_init(spa_t *spa, uint64_t txg, dsl_pool_t **dpp)
        int err;
        dsl_pool_t *dp = dsl_pool_open_impl(spa, txg);
 
+       /*
+        * Initialize the caller's dsl_pool_t structure before we actually open
+        * the meta objset.  This is done because a self-healing write zio may
+        * be issued as part of dmu_objset_open_impl() and the spa needs its
+        * dsl_pool_t initialized in order to handle the write.
+        */
+       *dpp = dp;
+
        err = dmu_objset_open_impl(spa, NULL, &dp->dp_meta_rootbp,
            &dp->dp_meta_objset);
-       if (err != 0)
+       if (err != 0) {
                dsl_pool_close(dp);
-       else
-               *dpp = dp;
+               *dpp = NULL;
+       }
 
        return (err);
 }
index 4468cdf88a9960715acd79daa3369f3cb00211f7..a220ae393ea84ba3bff63a56639ffa116bae6fda 100644 (file)
@@ -1974,6 +1974,16 @@ spa_load_verify_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
        return (0);
 }
 
+/* ARGSUSED */
+int
+verify_dataset_name_len(dsl_pool_t *dp, dsl_dataset_t *ds, void *arg)
+{
+       if (dsl_dataset_namelen(ds) >= ZFS_MAX_DATASET_NAME_LEN)
+               return (SET_ERROR(ENAMETOOLONG));
+
+       return (0);
+}
+
 static int
 spa_load_verify(spa_t *spa)
 {
@@ -1988,6 +1998,14 @@ spa_load_verify(spa_t *spa)
        if (policy.zrp_request & ZPOOL_NEVER_REWIND)
                return (0);
 
+       dsl_pool_config_enter(spa->spa_dsl_pool, FTAG);
+       error = dmu_objset_find_dp(spa->spa_dsl_pool,
+           spa->spa_dsl_pool->dp_root_dir_obj, verify_dataset_name_len, NULL,
+           DS_FIND_CHILDREN);
+       dsl_pool_config_exit(spa->spa_dsl_pool, FTAG);
+       if (error != 0)
+               return (error);
+
        rio = zio_root(spa, NULL, &sle,
            ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE);
 
index 929f18165934e22cd01a8745d2640fe42bfaee97..19432e0a024ea46788564dd6cbc4f33e6d682174 100644 (file)
@@ -174,7 +174,7 @@ spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl)
        VERIFY(nvlist_pack(nvl, &buf, &buflen, NV_ENCODE_XDR,
            KM_SLEEP) == 0);
 
-#ifdef __linux__
+#if defined(__linux__) && defined(_KERNEL)
        /*
         * Write the configuration to disk.  Due to the complexity involved
         * in performing a rename from within the kernel the file is truncated
@@ -201,7 +201,8 @@ spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl)
         */
        (void) snprintf(temp, MAXPATHLEN, "%s.tmp", dp->scd_path);
 
-       if (vn_open(temp, UIO_SYSSPACE, oflags, 0644, &vp, CRCREAT, 0) == 0) {
+       error = vn_open(temp, UIO_SYSSPACE, oflags, 0644, &vp, CRCREAT, 0);
+       if (error == 0) {
                if (vn_rdwr(UIO_WRITE, vp, buf, buflen, 0, UIO_SYSSPACE,
                    0, RLIM64_INFINITY, kcred, NULL) == 0 &&
                    VOP_FSYNC(vp, FSYNC, kcred, NULL) == 0) {
index 7aff5455b10b8a871c4869a3999146ae746333ce..7d814a63b41f684863992e75bdbc63707380caf1 100644 (file)
@@ -877,11 +877,11 @@ vdev_metaslab_init(vdev_t *vd, uint64_t txg)
 
        ASSERT(oldc <= newc);
 
-       mspp = kmem_zalloc(newc * sizeof (*mspp), KM_SLEEP);
+       mspp = vmem_zalloc(newc * sizeof (*mspp), KM_SLEEP);
 
        if (oldc != 0) {
                bcopy(vd->vdev_ms, mspp, oldc * sizeof (*mspp));
-               kmem_free(vd->vdev_ms, oldc * sizeof (*mspp));
+               vmem_free(vd->vdev_ms, oldc * sizeof (*mspp));
        }
 
        vd->vdev_ms = mspp;
@@ -935,7 +935,7 @@ vdev_metaslab_fini(vdev_t *vd)
                        if (msp != NULL)
                                metaslab_fini(msp);
                }
-               kmem_free(vd->vdev_ms, count * sizeof (metaslab_t *));
+               vmem_free(vd->vdev_ms, count * sizeof (metaslab_t *));
                vd->vdev_ms = NULL;
        }
 
@@ -1407,7 +1407,7 @@ vdev_validate(vdev_t *vd, boolean_t strict)
                    spa_last_synced_txg(spa) : -1ULL;
 
                if ((label = vdev_label_read_config(vd, txg)) == NULL) {
-                       vdev_set_state(vd, B_TRUE, VDEV_STATE_CANT_OPEN,
+                       vdev_set_state(vd, B_FALSE, VDEV_STATE_CANT_OPEN,
                            VDEV_AUX_BAD_LABEL);
                        return (0);
                }
@@ -1894,12 +1894,15 @@ vdev_dtl_reassess(vdev_t *vd, uint64_t txg, uint64_t scrub_txg, int scrub_done)
 
                /*
                 * If the vdev was resilvering and no longer has any
-                * DTLs then reset its resilvering flag.
+                * DTLs then reset its resilvering flag and dirty
+                * the top level so that we persist the change.
                 */
                if (vd->vdev_resilver_txg != 0 &&
                    range_tree_space(vd->vdev_dtl[DTL_MISSING]) == 0 &&
-                   range_tree_space(vd->vdev_dtl[DTL_OUTAGE]) == 0)
+                   range_tree_space(vd->vdev_dtl[DTL_OUTAGE]) == 0) {
                        vd->vdev_resilver_txg = 0;
+                       vdev_config_dirty(vd->vdev_top);
+               }
 
                mutex_exit(&vd->vdev_dtl_lock);
 
index 9b51ecc1d9687cd8bd805cfa2fb3de27c02adbfa..2f06e721bed961c7e9cf029d1dda42abf5fd4b75 100644 (file)
@@ -494,30 +494,45 @@ bio_map(struct bio *bio, void *bio_ptr, unsigned int bio_size)
        return (bio_size);
 }
 
+#ifndef bio_set_op_attrs
+#define        bio_set_op_attrs(bio, rw, flags) \
+       do { (bio)->bi_rw |= (rw)|(flags); } while (0)
+#endif
+
+static inline void
+vdev_submit_bio_impl(struct bio *bio)
+{
+#ifdef HAVE_1ARG_SUBMIT_BIO
+       submit_bio(bio);
+#else
+       submit_bio(0, bio);
+#endif
+}
+
 static inline void
-vdev_submit_bio(int rw, struct bio *bio)
+vdev_submit_bio(struct bio *bio)
 {
 #ifdef HAVE_CURRENT_BIO_TAIL
        struct bio **bio_tail = current->bio_tail;
        current->bio_tail = NULL;
-       submit_bio(rw, bio);
+       vdev_submit_bio_impl(bio);
        current->bio_tail = bio_tail;
 #else
        struct bio_list *bio_list = current->bio_list;
        current->bio_list = NULL;
-       submit_bio(rw, bio);
+       vdev_submit_bio_impl(bio);
        current->bio_list = bio_list;
 #endif
 }
 
 static int
 __vdev_disk_physio(struct block_device *bdev, zio_t *zio, caddr_t kbuf_ptr,
-    size_t kbuf_size, uint64_t kbuf_offset, int flags, int wait)
+    size_t kbuf_size, uint64_t kbuf_offset, int rw, int flags, int wait)
 {
        dio_request_t *dr;
        caddr_t bio_ptr;
        uint64_t bio_offset;
-       int rw, bio_size, bio_count = 16;
+       int bio_size, bio_count = 16;
        int i = 0, error = 0;
 
        ASSERT3U(kbuf_offset + kbuf_size, <=, bdev->bd_inode->i_size);
@@ -530,7 +545,6 @@ retry:
        if (zio && !(zio->io_flags & (ZIO_FLAG_IO_RETRY | ZIO_FLAG_TRYHARD)))
                bio_set_flags_failfast(bdev, &flags);
 
-       rw = flags;
        dr->dr_zio = zio;
        dr->dr_wait = wait;
 
@@ -574,9 +588,9 @@ retry:
 
                dr->dr_bio[i]->bi_bdev = bdev;
                BIO_BI_SECTOR(dr->dr_bio[i]) = bio_offset >> 9;
-               dr->dr_bio[i]->bi_rw = rw;
                dr->dr_bio[i]->bi_end_io = vdev_disk_physio_completion;
                dr->dr_bio[i]->bi_private = dr;
+               bio_set_op_attrs(dr->dr_bio[i], rw, flags);
 
                /* Remaining size is returned to become the new size */
                bio_size = bio_map(dr->dr_bio[i], bio_ptr, bio_size);
@@ -594,7 +608,7 @@ retry:
        /* Submit all bio's associated with this dio */
        for (i = 0; i < dr->dr_bio_count; i++)
                if (dr->dr_bio[i])
-                       vdev_submit_bio(rw, dr->dr_bio[i]);
+                       vdev_submit_bio(dr->dr_bio[i]);
 
        /*
         * On synchronous blocking requests we wait for all bio the completion
@@ -617,10 +631,11 @@ retry:
 
 int
 vdev_disk_physio(struct block_device *bdev, caddr_t kbuf,
-    size_t size, uint64_t offset, int flags)
+    size_t size, uint64_t offset, int rw, int flags)
 {
        bio_set_flags_failfast(bdev, &flags);
-       return (__vdev_disk_physio(bdev, NULL, kbuf, size, offset, flags, 1));
+       return (__vdev_disk_physio(bdev, NULL, kbuf, size, offset, rw, flags,
+           1));
 }
 
 BIO_END_IO_PROTO(vdev_disk_io_flush_completion, bio, rc)
@@ -661,7 +676,8 @@ vdev_disk_io_flush(struct block_device *bdev, zio_t *zio)
        bio->bi_private = zio;
        bio->bi_bdev = bdev;
        zio->io_delay = jiffies_64;
-       vdev_submit_bio(VDEV_WRITE_FLUSH_FUA, bio);
+       bio_set_op_attrs(bio, 0, VDEV_WRITE_FLUSH_FUA);
+       vdev_submit_bio(bio);
        invalidate_bdev(bdev);
 
        return (0);
@@ -673,7 +689,7 @@ vdev_disk_io_start(zio_t *zio)
        vdev_t *v = zio->io_vd;
        vdev_disk_t *vd = v->vdev_tsd;
        zio_priority_t pri = zio->io_priority;
-       int flags, error;
+       int rw, flags, error;
 
        switch (zio->io_type) {
        case ZIO_TYPE_IOCTL:
@@ -712,17 +728,19 @@ vdev_disk_io_start(zio_t *zio)
                zio_execute(zio);
                return;
        case ZIO_TYPE_WRITE:
+               rw = WRITE;
                if ((pri == ZIO_PRIORITY_SYNC_WRITE) && (v->vdev_nonrot))
                        flags = WRITE_SYNC;
                else
-                       flags = WRITE;
+                       flags = 0;
                break;
 
        case ZIO_TYPE_READ:
+               rw = READ;
                if ((pri == ZIO_PRIORITY_SYNC_READ) && (v->vdev_nonrot))
                        flags = READ_SYNC;
                else
-                       flags = READ;
+                       flags = 0;
                break;
 
        default:
@@ -732,7 +750,7 @@ vdev_disk_io_start(zio_t *zio)
        }
 
        error = __vdev_disk_physio(vd->vd_bdev, zio, zio->io_data,
-           zio->io_size, zio->io_offset, flags, 0);
+           zio->io_size, zio->io_offset, rw, flags, 0);
        if (error) {
                zio->io_error = error;
                zio_interrupt(zio);
@@ -833,7 +851,8 @@ vdev_disk_read_rootlabel(char *devpath, char *devid, nvlist_t **config)
                /* read vdev label */
                offset = vdev_label_offset(size, i, 0);
                if (vdev_disk_physio(bdev, (caddr_t)label,
-                   VDEV_SKIP_SIZE + VDEV_PHYS_SIZE, offset, READ_SYNC) != 0)
+                   VDEV_SKIP_SIZE + VDEV_PHYS_SIZE, offset, READ,
+                   REQ_SYNC) != 0)
                        continue;
 
                if (nvlist_unpack(label->vl_vdev_phys.vp_nvlist,
index 0c62a6fa3c7df4b3de618166dab6c710d7b6642a..4ed62f96328c8da8aee7a083afe2c9b3a07c1093 100644 (file)
@@ -249,20 +249,29 @@ static int
 vdev_queue_max_async_writes(spa_t *spa)
 {
        int writes;
-       uint64_t dirty = spa->spa_dsl_pool->dp_dirty_total;
+       uint64_t dirty = 0;
+       dsl_pool_t *dp = spa_get_dsl(spa);
        uint64_t min_bytes = zfs_dirty_data_max *
            zfs_vdev_async_write_active_min_dirty_percent / 100;
        uint64_t max_bytes = zfs_dirty_data_max *
            zfs_vdev_async_write_active_max_dirty_percent / 100;
 
+       /*
+        * Async writes may occur before the assignment of the spa's
+        * dsl_pool_t if a self-healing zio is issued prior to the
+        * completion of dmu_objset_open_impl().
+        */
+       if (dp == NULL)
+               return (zfs_vdev_async_write_max_active);
+
        /*
         * Sync tasks correspond to interactive user actions. To reduce the
         * execution time of those actions we push data out as fast as possible.
         */
-       if (spa_has_pending_synctask(spa)) {
+       if (spa_has_pending_synctask(spa))
                return (zfs_vdev_async_write_max_active);
-       }
 
+       dirty = dp->dp_dirty_total;
        if (dirty < min_bytes)
                return (zfs_vdev_async_write_min_active);
        if (dirty > max_bytes)
diff --git a/module/zfs/zfs.mod.c b/module/zfs/zfs.mod.c
deleted file mode 100644 (file)
index 9e0b227..0000000
+++ /dev/null
@@ -1,474 +0,0 @@
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
-       { 0x51198477, "module_layout" },
-       { 0xdd4acab1, "vn_fsync" },
-       { 0x9937746a, "d_path" },
-       { 0x13be9977, "nvlist_add_boolean_array" },
-       { 0x9a1dfd65, "strpbrk" },
-       { 0xb7d1325e, "nvlist_add_int32" },
-       { 0x6cc650a4, "zfs_prop_get_type" },
-       { 0x6ae12453, "__kstat_install" },
-       { 0x1c90ea0e, "nvlist_add_int64" },
-       { 0x36198a4d, "nvpair_value_string" },
-       { 0x405c1144, "get_seconds" },
-       { 0x8d8996ce, "z_uncompress" },
-       { 0x4c327173, "alloc_disk" },
-       { 0x34eccc79, "generic_getxattr" },
-       { 0x8b484c4c, "fnvlist_lookup_nvpair" },
-       { 0xcf47e212, "fnvlist_add_int32" },
-       { 0x26b64321, "call_usermodehelper_setfns" },
-       { 0xf5893abf, "up_read" },
-       { 0x8f20556d, "blk_cleanup_queue" },
-       { 0xaada9d55, "zfs_prop_init" },
-       { 0xb41ea00a, "nvlist_add_uint8_array" },
-       { 0xeae36f92, "blk_queue_io_opt" },
-       { 0xdc89486b, "zfs_name_to_prop" },
-       { 0xdb347c7a, "call_usermodehelper_exec" },
-       { 0x3a3b4efc, "generic_file_llseek" },
-       { 0xda48c2e6, "__mark_inode_dirty" },
-       { 0xd4bf55ff, "u8_validate" },
-       { 0x3228f0a3, "d_invalidate" },
-       { 0x21b5a134, "__set_page_dirty_nobuffers" },
-       { 0xf2f1ef64, "fnvlist_alloc" },
-       { 0xadaabe1b, "pv_lock_ops" },
-       { 0x349cba85, "strchr" },
-       { 0x9191a98c, "nvlist_add_uint32_array" },
-       { 0xce291afa, "bio_alloc" },
-       { 0x150ddbd2, "kstat_runq_enter" },
-       { 0x370dbc79, "__remove_inode_hash" },
-       { 0x2fe3ab3e, "get_gendisk" },
-       { 0x3ec8886f, "param_ops_int" },
-       { 0x1403a15e, "taskq_member" },
-       { 0xb0364551, "zio_arena" },
-       { 0xf5dea0d6, "nvpair_value_int64_array" },
-       { 0x25ec1b28, "strlen" },
-       { 0xd0ee38b8, "schedule_timeout_uninterruptible" },
-       { 0x8205f265, "crhold" },
-       { 0x3a9b6fb9, "blk_unregister_region" },
-       { 0xb37f3106, "d_set_d_op" },
-       { 0xaaf57193, "blk_queue_max_hw_sectors" },
-       { 0x1efe1f66, "vn_close" },
-       { 0xa6867664, "filemap_write_and_wait_range" },
-       { 0x4ff1c9bc, "populate_rootfs_wait" },
-       { 0x16916efb, "nvlist_prev_nvpair" },
-       { 0x19295e53, "taskq_create" },
-       { 0x1ba29031, "zfs_component_namecheck" },
-       { 0xffc19dde, "elevator_change" },
-       { 0x89a7204c, "kill_anon_super" },
-       { 0x3f38bd50, "crgetruid" },
-       { 0x6a4152d5, "nvlist_add_uint64" },
-       { 0x6363ef50, "fnvlist_pack_free" },
-       { 0xd0799edd, "posix_acl_to_xattr" },
-       { 0xd14a7eb5, "vn_getattr" },
-       { 0xed8dac48, "nvlist_pack" },
-       { 0xbd100793, "cpu_online_mask" },
-       { 0x79aa04a2, "get_random_bytes" },
-       { 0x67053080, "current_kernel_time" },
-       { 0xf4f0a175, "avl_nearest" },
-       { 0xab140103, "spl_kmem_alloc" },
-       { 0x5d16cdc5, "nvlist_exists" },
-       { 0xd0bd878, "seq_puts" },
-       { 0x80c478fd, "rootdir" },
-       { 0xa850554e, "vn_seek" },
-       { 0x73a78bc4, "downgrade_write" },
-       { 0xcb98e344, "truncate_inode_pages_range" },
-       { 0x2e93154b, "generic_file_open" },
-       { 0xacf4d843, "match_strdup" },
-       { 0xffff91e3, "taskq_init_ent" },
-       { 0x3f69d73b, "test_set_page_writeback" },
-       { 0xefc4da17, "kobj_close_file" },
-       { 0xcf24ceff, "nvlist_remove" },
-       { 0xcd69282b, "__lock_page" },
-       { 0xb54533f7, "usecs_to_jiffies" },
-       { 0x581b3ff3, "zpool_prop_get_type" },
-       { 0xa483a8c3, "zfs_prop_to_name" },
-       { 0x63bdf5f0, "crgetngroups" },
-       { 0xf7fb002a, "kobj_get_filesize" },
-       { 0xd6f70ea0, "nvlist_empty" },
-       { 0x187c0510, "nvpair_value_int64" },
-       { 0x21a7d814, "seq_printf" },
-       { 0xac095684, "zfs_prop_inheritable" },
-       { 0xb6c2717d, "fnvlist_lookup_uint64" },
-       { 0x44e9a829, "match_token" },
-       { 0x582829a0, "avl_last" },
-       { 0xf4e84391, "nvlist_add_nvlist" },
-       { 0xb205e7ee, "nvpair_value_uint16_array" },
-       { 0x8e4c2658, "crgetgroups" },
-       { 0x7cb40d78, "avl_insert_here" },
-       { 0xf3e29ae0, "zpool_prop_to_name" },
-       { 0x64913468, "nvpair_value_uint8_array" },
-       { 0x305105e, "end_writeback" },
-       { 0xba2adaf, "mutex_unlock" },
-       { 0x407478e1, "nvpair_value_uint32_array" },
-       { 0x85df9b6c, "strsep" },
-       { 0xccc94e8, "nvlist_lookup_string" },
-       { 0x4704f678, "vn_rdwr" },
-       { 0xb05ef89e, "fnvlist_add_uint64" },
-       { 0x80336cc4, "generic_read_dir" },
-       { 0x1083f24f, "zfs_prop_valid_for_type" },
-       { 0x5be9e34a, "zfs_prop_setonce" },
-       { 0x76e8f609, "igrab" },
-       { 0x76ad2c09, "fnvlist_size" },
-       { 0x58b765b9, "pool_namecheck" },
-       { 0x47c7b0d2, "cpu_number" },
-       { 0x75fb8325, "generic_setxattr" },
-       { 0xafe82e10, "strcspn" },
-       { 0x3b251083, "mount_nodev" },
-       { 0x84000109, "path_get" },
-       { 0xa5894c2a, "redirty_page_for_writepage" },
-       { 0x91715312, "sprintf" },
-       { 0x8eb0a41f, "tsd_destroy" },
-       { 0xb8e71471, "spl_kmem_cache_free" },
-       { 0xbc32eee7, "spl_panic" },
-       { 0xcc13e034, "nv_alloc_init" },
-       { 0x50ea1952, "nvlist_add_int16_array" },
-       { 0x7d11c268, "jiffies" },
-       { 0x6ccdbacb, "lookup_bdev" },
-       { 0x6fba9cae, "truncate_setsize" },
-       { 0x31eb4278, "mutex_trylock" },
-       { 0x57a6ccd0, "down_read" },
-       { 0xe2d5255a, "strcmp" },
-       { 0x35225ea3, "down_write_trylock" },
-       { 0xb3d0550d, "end_page_writeback" },
-       { 0x8a4cbe5a, "cv_timedwait_hires" },
-       { 0xde9360ba, "totalram_pages" },
-       { 0xaa65a555, "kmem_asprintf" },
-       { 0x42585bc5, "nvlist_add_string_array" },
-       { 0x1d06c4ac, "u8_strcmp" },
-       { 0xd416eac3, "nvlist_xalloc" },
-       { 0xcfb24408, "nvpair_value_int32" },
-       { 0x786ba98a, "crgetuid" },
-       { 0xf2cb0b79, "uio_prefaultpages" },
-       { 0xba3e2d71, "zone_get_hostid" },
-       { 0xd1bf81d6, "invalidate_bdev" },
-       { 0x6395be94, "__init_waitqueue_head" },
-       { 0x4f8b5ddb, "_copy_to_user" },
-       { 0x3c7cdc13, "avl_remove" },
-       { 0x528f1f4e, "nvpair_value_int8_array" },
-       { 0xe24d3a97, "jiffies_64" },
-       { 0xee8843fa, "nvpair_value_uint64" },
-       { 0xc98d2e5d, "blk_queue_max_segments" },
-       { 0x106b6ba8, "taskq_destroy" },
-       { 0x6d0aba34, "wait_for_completion" },
-       { 0x72aa82c6, "param_ops_charp" },
-       { 0xb11fa1ce, "strlcat" },
-       { 0x45fe0d68, "inode_owner_or_capable" },
-       { 0x114258fb, "misc_register" },
-       { 0x7023fd74, "zfs_spa_version_map" },
-       { 0x66cb0ee2, "nvpair_value_uint64_array" },
-       { 0xaba3870c, "kern_path" },
-       { 0xde0bdcff, "memset" },
-       { 0x8b78128, "spl_kmem_cache_destroy" },
-       { 0xbd256438, "nvlist_lookup_nvpair" },
-       { 0x81c1c2b2, "vmem_size" },
-       { 0xbc9dddde, "taskq_wait_id" },
-       { 0x4f6584e1, "vn_getf" },
-       { 0x516b8b85, "nvlist_add_int8_array" },
-       { 0x79a0ecea, "d_add_ci" },
-       { 0xc810362f, "strdup" },
-       { 0x852e6c79, "blk_alloc_queue" },
-       { 0x26cd2d80, "fnvlist_num_pairs" },
-       { 0x22c35c6c, "fnvpair_value_nvlist" },
-       { 0xe9ba039d, "avl_destroy" },
-       { 0x11089ac7, "_ctype" },
-       { 0xd9977d8, "fletcher_4_incremental_native" },
-       { 0x8f64aa4, "_raw_spin_unlock_irqrestore" },
-       { 0x69371301, "current_task" },
-       { 0x143fcac6, "__cv_signal" },
-       { 0x7b6047b1, "avl_numnodes" },
-       { 0x6127b911, "kstat_waitq_exit" },
-       { 0x882c1dc4, "check_disk_change" },
-       { 0x2d004b80, "current_fs_time" },
-       { 0x87ebeb76, "__mutex_init" },
-       { 0x27e1a049, "printk" },
-       { 0xeba677bd, "posix_acl_chmod" },
-       { 0x30da4fbf, "fnvlist_free" },
-       { 0xe6b9d3c4, "find_lock_page" },
-       { 0xeb69fdd8, "d_obtain_alias" },
-       { 0x2fa5a500, "memcmp" },
-       { 0x90cc07c8, "blk_queue_max_discard_sectors" },
-       { 0x9d9024f7, "del_gendisk" },
-       { 0x68a9f991, "nvlist_add_uint16_array" },
-       { 0xa4cec62, "nv_fixed_ops" },
-       { 0x6a36f138, "zpool_prop_feature" },
-       { 0xd04b4649, "crgetfsgid" },
-       { 0xf2048734, "bio_add_page" },
-       { 0xe8856dea, "nvlist_remove_nvpair" },
-       { 0x35b9d4a6, "nvlist_add_nvlist_array" },
-       { 0x75a78768, "nvlist_alloc" },
-       { 0xa26a953e, "fletcher_2_byteswap" },
-       { 0x27655c15, "zfs_allocatable_devs" },
-       { 0xf7eb91ff, "d_alloc_root" },
-       { 0xe52592a, "panic" },
-       { 0xe2fd64d6, "nvpair_value_hrtime" },
-       { 0xa1c76e0a, "_cond_resched" },
-       { 0xb940ee11, "taskq_wait" },
-       { 0x7ec9bfbc, "strncpy" },
-       { 0x70f7c090, "__kstat_set_raw_ops" },
-       { 0xb4390f9a, "mcount" },
-       { 0x422932ac, "nvlist_lookup_int32" },
-       { 0x9e5f923c, "blkdev_get_by_path" },
-       { 0x5da5c9c6, "security_inode_init_security" },
-       { 0x8b19c37b, "check_disk_size_change" },
-       { 0x11edcd4c, "blk_register_region" },
-       { 0x85abc85f, "strncmp" },
-       { 0x672144bd, "strlcpy" },
-       { 0xbf8ba54a, "vprintk" },
-       { 0xafe1db9d, "mutex_lock" },
-       { 0xe5318fa0, "write_cache_pages" },
-       { 0xa340453c, "system_taskq" },
-       { 0x13401075, "taskq_dispatch" },
-       { 0xc8f88566, "nvpair_value_uint16" },
-       { 0x9f1dd1aa, "avl_insert" },
-       { 0x732cbdd2, "avl_is_empty" },
-       { 0xcb99edb0, "posix_acl_equiv_mode" },
-       { 0x5bb6ad4b, "spl_vmem_zalloc" },
-       { 0x71a50dbc, "register_blkdev" },
-       { 0x9b4571df, "nvpair_value_int32_array" },
-       { 0x79cca7cb, "uioskip" },
-       { 0x30cc3621, "insert_inode_locked" },
-       { 0xb3db5628, "avl_create" },
-       { 0xafa476dd, "nvpair_value_int8" },
-       { 0x90782bf3, "nvlist_add_string" },
-       { 0x13f6f973, "wait_on_page_bit" },
-       { 0x5559ab10, "zfs_deleg_whokey" },
-       { 0x4223cbc0, "uiocopy" },
-       { 0x7a82be45, "unlock_page" },
-       { 0x3b4ceb4a, "up_write" },
-       { 0x5318e74d, "shrink_dcache_sb" },
-       { 0x1ebbfffd, "ddi_copyout" },
-       { 0xe6e3b875, "down_write" },
-       { 0xcc762837, "kstat_waitq_enter" },
-       { 0x52252d43, "get_disk" },
-       { 0x6d601403, "crgetgid" },
-       { 0x64623de, "kmem_vasprintf" },
-       { 0x618628e6, "avl_destroy_nodes" },
-       { 0xd16645b6, "fnvlist_add_nvlist" },
-       { 0x89f2142a, "nvpair_value_nvlist_array" },
-       { 0xdb9e2c22, "posix_acl_create" },
-       { 0xd42a96fa, "nvpair_name" },
-       { 0x52778ec7, "vcmn_err" },
-       { 0x7c0a143, "bio_endio" },
-       { 0x920ca817, "bio_put" },
-       { 0xf41bf8b5, "generic_removexattr" },
-       { 0x1b7b5809, "__cv_broadcast" },
-       { 0x3323ccb1, "tsd_get" },
-       { 0xfcb16c49, "mark_page_accessed" },
-       { 0x180d429, "nvlist_add_int64_array" },
-       { 0x53bddca5, "taskq_dispatch_ent" },
-       { 0x61651be, "strcat" },
-       { 0x27277915, "vm_stat" },
-       { 0xd1346eaa, "avl_first" },
-       { 0x5cbae8f4, "crgetfsuid" },
-       { 0x1bc61496, "nvpair_value_int16_array" },
-       { 0xb5a459dc, "unregister_blkdev" },
-       { 0x24208ad1, "__cv_wait_io" },
-       { 0xb428a99c, "zfs_deleg_verify_nvlist" },
-       { 0x87b743ea, "inode_init_once" },
-       { 0x1bfac311, "nvlist_lookup_nvlist" },
-       { 0x7479525e, "fnvlist_add_uint64_array" },
-       { 0x9d9f80c4, "nvlist_free" },
-       { 0x5eb99327, "simple_getattr" },
-       { 0x50c5246d, "nvlist_add_uint8" },
-       { 0x5d6e0bba, "nvlist_lookup_uint64" },
-       { 0xaeefe7de, "submit_bio" },
-       { 0xc6cbbc89, "capable" },
-       { 0x31eaf145, "init_task" },
-       { 0xb1c3a01a, "oops_in_progress" },
-       { 0x9f984513, "strrchr" },
-       { 0x351c2576, "z_compress_level" },
-       { 0x901bfc1a, "ilookup" },
-       { 0x81376bfd, "vn_remove" },
-       { 0xb0030d43, "blkdev_put" },
-       { 0xc50bab05, "unregister_shrinker" },
-       { 0xe8adb6d8, "nvpair_value_boolean_value" },
-       { 0x81483072, "nvlist_add_uint16" },
-       { 0x9e3e7c5, "simple_dir_operations" },
-       { 0xeaa8f57, "generic_file_mmap" },
-       { 0x12a38747, "usleep_range" },
-       { 0x6ae07d22, "__cv_wait" },
-       { 0x17980bc5, "crfree" },
-       { 0x34fdc162, "nvlist_unpack" },
-       { 0x62dbf439, "blk_queue_make_request" },
-       {  0x1e77f, "nvlist_add_int32_array" },
-       { 0x1ef1f75f, "posix_acl_valid" },
-       { 0xaeab70e4, "zfs_prop_default_numeric" },
-       { 0xfce9b49e, "uiomove" },
-       { 0xc54a86a3, "blk_queue_physical_block_size" },
-       { 0x10006f1f, "nvlist_lookup_nv_alloc" },
-       { 0xf7b48661, "vn_set_pwd" },
-       { 0xcb59902f, "nvlist_lookup_byte_array" },
-       { 0xf0fdf6cb, "__stack_chk_fail" },
-       { 0xb9249d16, "cpu_possible_mask" },
-       { 0x3bd1b1f6, "msecs_to_jiffies" },
-       { 0xfe56e2a4, "nvpair_value_int16" },
-       { 0xcc8e80f8, "kstat_runq_exit" },
-       { 0x1000e51, "schedule" },
-       { 0x958b84e3, "tsd_create" },
-       { 0x667ba081, "spl_kmem_cache_create" },
-       { 0x20173f35, "taskq_wait_outstanding" },
-       { 0x5295f485, "posix_acl_from_xattr" },
-       { 0x85261be0, "__kstat_create" },
-       { 0xaebbec7c, "kobj_read_file" },
-       { 0x5b2da8a8, "put_disk" },
-       { 0xffa90716, "unlock_new_inode" },
-       { 0x2bbdb1d2, "nvlist_add_uint32" },
-       { 0x6da84db2, "deactivate_super" },
-       { 0x7274e02f, "bdi_setup_and_register" },
-       { 0x447bea0b, "fnvpair_value_uint64" },
-       { 0x2e36ff5c, "nvlist_remove_all" },
-       { 0x6dc38171, "fnvlist_add_boolean" },
-       { 0xd94959c7, "fletcher_4_native" },
-       { 0x5e95b1cd, "current_umask" },
-       { 0xb948e867, "zfs_prop_userquota" },
-       { 0xd0920999, "nvpair_value_uint32" },
-       { 0xc5ca5da8, "nvlist_merge" },
-       { 0xdae80439, "spl_vmem_alloc" },
-       { 0xdeea79ca, "nvlist_add_int8" },
-       { 0xd22ed5e2, "spl_kmem_cache_alloc" },
-       { 0x6b63f55e, "heap_arena" },
-       { 0x1e60b5ba, "clear_page_dirty_for_io" },
-       { 0xc6956d59, "inode_change_ok" },
-       { 0xa3a77c69, "down_read_trylock" },
-       { 0x65f3602b, "vn_releasef" },
-       { 0x82384b7, "path_put" },
-       { 0x4b88e0e9, "zpool_get_rewind_policy" },
-       { 0x360e492b, "__cv_init" },
-       { 0xd52bf1ce, "_raw_spin_lock" },
-       { 0x2168361b, "fnvlist_add_nvlist_array" },
-       { 0xff3980bf, "read_cache_pages" },
-       { 0xb6445021, "zpool_prop_init" },
-       { 0x9327f5ce, "_raw_spin_lock_irqsave" },
-       { 0xe9167510, "fnvpair_value_string" },
-       { 0xe52947e7, "__phys_addr" },
-       { 0x7521d525, "fnvlist_lookup_string" },
-       { 0x1b8f1d1e, "strfree" },
-       { 0x9e7bdafa, "register_filesystem" },
-       { 0xdafb8f63, "zpool_name_to_prop" },
-       { 0x29c88b11, "nvlist_next_nvpair" },
-       { 0x10f2eb76, "vsnprintf" },
-       { 0x443890f9, "u8_textprep_str" },
-       { 0x659a64d0, "call_usermodehelper_setup" },
-       { 0x16d71b69, "__cv_wait_sig" },
-       { 0x88163724, "zfs_prop_user" },
-       { 0x2c0fbe10, "vn_open" },
-       { 0xa456b044, "zfs_prop_readonly" },
-       { 0x82027a4c, "cmn_err" },
-       { 0xff40513c, "avl_find" },
-       { 0xc43ab895, "nvlist_add_boolean_value" },
-       { 0xe6990065, "fletcher_4_incremental_byteswap" },
-       { 0x506746b6, "getrawmonotonic" },
-       { 0x2e99f25f, "__cv_timedwait_sig" },
-       { 0x8dfdd77d, "fnvpair_value_int32" },
-       { 0x4c82bcb5, "nvlist_add_byte" },
-       { 0x5c5fd5f1, "iput" },
-       { 0xa0ed48c9, "fnvlist_lookup_nvlist" },
-       { 0x6db955bf, "nvpair_type" },
-       { 0xd2c3d1c4, "ddi_copyin" },
-       { 0x1285cb78, "tsd_set" },
-       { 0x3896a905, "__thread_exit" },
-       { 0x37a0cba, "kfree" },
-       { 0x531d58c3, "zpool_prop_index_to_string" },
-       { 0xd234c7f7, "nvlist_add_nvpair" },
-       { 0x236c8c64, "memcpy" },
-       { 0x3799704a, "spl_kmem_cache_set_move" },
-       { 0x5ecf6f91, "vn_mode_to_vtype" },
-       { 0xea8a6c75, "param_ops_long" },
-       { 0xe3e12c4f, "d_splice_alias" },
-       { 0x9518b623, "register_shrinker" },
-       { 0xe1f620de, "add_disk" },
-       { 0x4b2cb038, "zfs_prop_index_to_string" },
-       { 0xd1c1752d, "zfs_zpl_version_map" },
-       { 0x434773c9, "avl_walk" },
-       { 0xf715d7e4, "fletcher_4_byteswap" },
-       { 0x86f43149, "zfs_userquota_prop_prefixes" },
-       { 0xf68905fd, "ddi_strtoull" },
-       { 0x45dd41aa, "generic_readlink" },
-       { 0xa2fb3ea8, "put_page" },
-       { 0x5aa48f01, "bdi_destroy" },
-       { 0x4cbbd171, "__bitmap_weight" },
-       { 0x4b69abe5, "nvpair_value_byte" },
-       { 0x6811efbd, "nvlist_size" },
-       { 0xd7e6464c, "fletcher_2_native" },
-       { 0x3d6d97a2, "ioctl_by_bdev" },
-       { 0x670fde39, "fnvlist_pack" },
-       { 0x5cc844b3, "unregister_filesystem" },
-       { 0x6cfc93ad, "init_special_inode" },
-       { 0x9f46de9, "kobj_open_file" },
-       { 0x4e7a84e6, "avl_add" },
-       { 0x185936d6, "groupmember" },
-       { 0x4ea06afa, "nvlist_add_byte_array" },
-       { 0x4b06d2e7, "complete" },
-       { 0x50720c5f, "snprintf" },
-       { 0x3a1aa9fb, "bdget" },
-       { 0x7be1c89e, "blk_queue_max_segment_size" },
-       { 0xd433d2cb, "__kstat_delete" },
-       { 0xa3de192d, "fnvlist_add_string" },
-       { 0x504be4f9, "nvlist_add_int16" },
-       { 0xec1cce40, "nvlist_lookup_nvlist_array" },
-       { 0x4ccb2dda, "new_inode" },
-       { 0xa3a5be95, "memmove" },
-       { 0x43c69f9a, "zpool_prop_default_numeric" },
-       { 0xae5d807c, "vmalloc_to_page" },
-       { 0x80c3f220, "spl_kmem_free" },
-       { 0x8eb2664d, "fnvlist_remove_nvpair" },
-       { 0x6edb75cf, "follow_down_one" },
-       { 0x7466fa85, "spl_kmem_cache_reap_now" },
-       { 0xaa9db9bb, "nvlist_add_uint64_array" },
-       { 0xf473f2ff, "blkdev_get" },
-       { 0xc236e29a, "zfs_prop_default_string" },
-       { 0xbaa28806, "simple_dir_inode_operations" },
-       { 0x1500ba78, "__thread_create" },
-       { 0x778a305, "spl_vmem_free" },
-       { 0x4f6b400b, "_copy_from_user" },
-       { 0xb3e56341, "taskq_cancel_id" },
-       { 0xa2c56c31, "param_ops_ulong" },
-       { 0xfad8deb5, "nv_alloc_fini" },
-       { 0xc3fe87c8, "param_ops_uint" },
-       { 0x19471135, "bdget_disk" },
-       { 0xa66a6969, "nvpair_value_nvlist" },
-       { 0xdfb0b5e5, "misc_deregister" },
-       { 0xf91d3b5a, "nvlist_dup" },
-       { 0x62c31a0, "bdput" },
-       { 0x9c679abb, "d_instantiate" },
-       { 0x2a6e6109, "__init_rwsem" },
-       { 0xec031267, "taskq_dispatch_delay" },
-       { 0x2821e0b2, "nvlist_lookup_uint64_array" },
-       { 0x85524b8b, "p0" },
-       { 0x59fe72f0, "__cv_destroy" },
-       { 0x38dbd03a, "dataset_namecheck" },
-       { 0x5fb4b61d, "fnvlist_dup" },
-       { 0x8b50312f, "generic_fillattr" },
-       { 0x2e1cae5a, "vn_openat" },
-       { 0xe914e41e, "strcpy" },
-       { 0xda6b5415, "set_disk_ro" },
-       { 0x9dcb88fc, "spl_kmem_zalloc" },
-       { 0x75907276, "kmem_debugging" },
-       { 0xc3ff0fa1, "nvpair_value_uint8" },
-       { 0xdb7958d9, "taskq_empty_ent" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=spl,znvpair,zcommon,zunicode,zavl";
-
-
-MODULE_INFO(srcversion, "6D4A581C24AFCEC615C1511");
index a208dea15e5aca0ea52e79afb3577c7a8a2dd41a..bbb01930fa79e4a55f496c4e1ca52384c5aaa052 100644 (file)
@@ -2473,53 +2473,33 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr)
 {
        uint32_t        working_mode;
        int             error;
-       boolean_t       check_privs;
-       znode_t         *check_zp = zp;
+       int             is_attr;
+       boolean_t       check_privs;
+       znode_t         *xzp;
+       znode_t         *check_zp = zp;
        mode_t          needed_bits;
        uid_t           owner;
 
+       is_attr = ((zp->z_pflags & ZFS_XATTR) && S_ISDIR(ZTOI(zp)->i_mode));
+
        /*
         * If attribute then validate against base file
         */
-       if ((zp->z_pflags & ZFS_XATTR) && S_ISDIR(ZTOI(zp)->i_mode)) {
+       if (is_attr) {
                uint64_t        parent;
 
-               rw_enter(&zp->z_xattr_lock, RW_READER);
-               if (zp->z_xattr_parent) {
-                       check_zp = zp->z_xattr_parent;
-                       rw_exit(&zp->z_xattr_lock);
-
-                       /*
-                        * Verify a lookup yields the same znode.
-                        */
-                       ASSERT3S(sa_lookup(zp->z_sa_hdl, SA_ZPL_PARENT(
-                           ZTOZSB(zp)), &parent, sizeof (parent)), ==, 0);
-                       ASSERT3U(check_zp->z_id, ==, parent);
-               } else {
-                       rw_exit(&zp->z_xattr_lock);
-
-                       error = sa_lookup(zp->z_sa_hdl, SA_ZPL_PARENT(
-                           ZTOZSB(zp)), &parent, sizeof (parent));
-                       if (error)
-                               return (error);
+               if ((error = sa_lookup(zp->z_sa_hdl,
+                   SA_ZPL_PARENT(ZTOZSB(zp)), &parent,
+                   sizeof (parent))) != 0)
+                       return (error);
 
-                       /*
-                        * Cache the lookup on the parent file znode as
-                        * zp->z_xattr_parent and hold a reference.  This
-                        * effectively pins the parent in memory until all
-                        * child xattr znodes have been destroyed and
-                        * release their references in zfs_inode_destroy().
-                        */
-                       error = zfs_zget(ZTOZSB(zp), parent, &check_zp);
-                       if (error)
-                               return (error);
-
-                       rw_enter(&zp->z_xattr_lock, RW_WRITER);
-                       if (zp->z_xattr_parent == NULL)
-                               zp->z_xattr_parent = check_zp;
-                       rw_exit(&zp->z_xattr_lock);
+               if ((error = zfs_zget(ZTOZSB(zp),
+                   parent, &xzp)) != 0)        {
+                       return (error);
                }
 
+               check_zp = xzp;
+
                /*
                 * fixup mode to map to xattr perms
                 */
@@ -2561,11 +2541,15 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr)
 
        if ((error = zfs_zaccess_common(check_zp, mode, &working_mode,
            &check_privs, skipaclchk, cr)) == 0) {
+               if (is_attr)
+                       iput(ZTOI(xzp));
                return (secpolicy_vnode_access2(cr, ZTOI(zp), owner,
                    needed_bits, needed_bits));
        }
 
        if (error && !check_privs) {
+               if (is_attr)
+                       iput(ZTOI(xzp));
                return (error);
        }
 
@@ -2626,6 +2610,9 @@ zfs_zaccess(znode_t *zp, int mode, int flags, boolean_t skipaclchk, cred_t *cr)
                    needed_bits, needed_bits);
        }
 
+       if (is_attr)
+               iput(ZTOI(xzp));
+
        return (error);
 }
 
index fc46a7307f441ce78fa6976c10a8028703d72975..05d841d4bb17b963fc485e44c6fe121c36e7246a 100644 (file)
@@ -486,7 +486,6 @@ zfsctl_inode_alloc(zfs_sb_t *zsb, uint64_t id,
        zp->z_gid = 0;
        zp->z_mode = 0;
        zp->z_sync_cnt = 0;
-       zp->z_is_zvol = B_FALSE;
        zp->z_is_mapped = B_FALSE;
        zp->z_is_ctldir = B_TRUE;
        zp->z_is_sa = B_FALSE;
index c1eadd0dc2508c382a46661ebc4ab9dac5cd941a..b0c8e3658211d35f5e28ce37d44c2f51aed9c2f5 100644 (file)
@@ -593,7 +593,7 @@ zfs_purgedir(znode_t *dzp)
                if (error)
                        skipped += 1;
                dmu_tx_commit(tx);
-
+               set_nlink(ZTOI(xzp), xzp->z_links);
                zfs_iput_async(ZTOI(xzp));
        }
        zap_cursor_fini(&zc);
@@ -694,6 +694,7 @@ zfs_rmnode(znode_t *zp)
                mutex_enter(&xzp->z_lock);
                xzp->z_unlinked = B_TRUE;       /* mark xzp for deletion */
                xzp->z_links = 0;       /* no more links to it */
+               set_nlink(ZTOI(xzp), 0); /* this will let iput purge us */
                VERIFY(0 == sa_update(xzp->z_sa_hdl, SA_ZPL_LINKS(zsb),
                    &xzp->z_links, sizeof (xzp->z_links), tx));
                mutex_exit(&xzp->z_lock);
index 745f7132bee8c5ad09fe80d6e3f62ee76ffb7853..3ebe28d7fcfc413c809a2ccfe6c5cda47ba3fb67 100644 (file)
@@ -1379,9 +1379,9 @@ get_zfs_sb(const char *dsname, zfs_sb_t **zsbp)
 
        mutex_enter(&os->os_user_ptr_lock);
        *zsbp = dmu_objset_get_user(os);
-       if (*zsbp && (*zsbp)->z_sb) {
-               atomic_inc(&((*zsbp)->z_sb->s_active));
-       } else {
+       /* bump s_active only when non-zero to prevent umount race */
+       if (*zsbp == NULL || (*zsbp)->z_sb == NULL ||
+           !atomic_inc_not_zero(&((*zsbp)->z_sb->s_active))) {
                error = SET_ERROR(ESRCH);
        }
        mutex_exit(&os->os_user_ptr_lock);
index 5064eb796b796e9c714c2fd96855578e2f67a81d..fd3e8a68d2a71db93249655676aab8ad10edaf32 100644 (file)
  * Check if a write lock can be grabbed, or wait and recheck until available.
  */
 static void
-zfs_range_lock_writer(znode_t *zp, rl_t *new)
+zfs_range_lock_writer(zfs_rlock_t *zrl, rl_t *new)
 {
-       avl_tree_t *tree = &zp->z_range_avl;
+       avl_tree_t *tree = &zrl->zr_avl;
        rl_t *rl;
        avl_index_t where;
        uint64_t end_size;
@@ -112,32 +112,32 @@ zfs_range_lock_writer(znode_t *zp, rl_t *new)
 
        for (;;) {
                /*
-                * Range locking is also used by zvol and uses a
-                * dummied up znode. However, for zvol, we don't need to
-                * append or grow blocksize, and besides we don't have
-                * a "sa" data or zfs_sb_t - so skip that processing.
+                * Range locking is also used by zvol. However, for zvol, we
+                * don't need to append or grow blocksize, so skip that
+                * processing.
                 *
                 * Yes, this is ugly, and would be solved by not handling
                 * grow or append in range lock code. If that was done then
                 * we could make the range locking code generically available
                 * to other non-zfs consumers.
                 */
-               if (!zp->z_is_zvol) { /* caller is ZPL */
+               if (zrl->zr_size) { /* caller is ZPL */
                        /*
                         * If in append mode pick up the current end of file.
                         * This is done under z_range_lock to avoid races.
                         */
                        if (new->r_type == RL_APPEND)
-                               new->r_off = zp->z_size;
+                               new->r_off = *zrl->zr_size;
 
                        /*
                         * If we need to grow the block size then grab the whole
                         * file range. This is also done under z_range_lock to
                         * avoid races.
                         */
-                       end_size = MAX(zp->z_size, new->r_off + len);
-                       if (end_size > zp->z_blksz && (!ISP2(zp->z_blksz) ||
-                           zp->z_blksz < ZTOZSB(zp)->z_max_blksz)) {
+                       end_size = MAX(*zrl->zr_size, new->r_off + len);
+                       if (end_size > *zrl->zr_blksz &&
+                           (!ISP2(*zrl->zr_blksz) ||
+                           *zrl->zr_blksz < *zrl->zr_max_blksz)) {
                                new->r_off = 0;
                                new->r_len = UINT64_MAX;
                        }
@@ -175,7 +175,7 @@ wait:
                        cv_init(&rl->r_wr_cv, NULL, CV_DEFAULT, NULL);
                        rl->r_write_wanted = B_TRUE;
                }
-               cv_wait(&rl->r_wr_cv, &zp->z_range_lock);
+               cv_wait(&rl->r_wr_cv, &zrl->zr_mutex);
 
                /* reset to original */
                new->r_off = off;
@@ -353,9 +353,9 @@ zfs_range_add_reader(avl_tree_t *tree, rl_t *new, rl_t *prev, avl_index_t where)
  * Check if a reader lock can be grabbed, or wait and recheck until available.
  */
 static void
-zfs_range_lock_reader(znode_t *zp, rl_t *new)
+zfs_range_lock_reader(zfs_rlock_t *zrl, rl_t *new)
 {
-       avl_tree_t *tree = &zp->z_range_avl;
+       avl_tree_t *tree = &zrl->zr_avl;
        rl_t *prev, *next;
        avl_index_t where;
        uint64_t off = new->r_off;
@@ -378,7 +378,7 @@ retry:
                                cv_init(&prev->r_rd_cv, NULL, CV_DEFAULT, NULL);
                                prev->r_read_wanted = B_TRUE;
                        }
-                       cv_wait(&prev->r_rd_cv, &zp->z_range_lock);
+                       cv_wait(&prev->r_rd_cv, &zrl->zr_mutex);
                        goto retry;
                }
                if (off + len < prev->r_off + prev->r_len)
@@ -401,7 +401,7 @@ retry:
                                cv_init(&next->r_rd_cv, NULL, CV_DEFAULT, NULL);
                                next->r_read_wanted = B_TRUE;
                        }
-                       cv_wait(&next->r_rd_cv, &zp->z_range_lock);
+                       cv_wait(&next->r_rd_cv, &zrl->zr_mutex);
                        goto retry;
                }
                if (off + len <= next->r_off + next->r_len)
@@ -423,14 +423,14 @@ got_lock:
  * previously locked as RL_WRITER).
  */
 rl_t *
-zfs_range_lock(znode_t *zp, uint64_t off, uint64_t len, rl_type_t type)
+zfs_range_lock(zfs_rlock_t *zrl, uint64_t off, uint64_t len, rl_type_t type)
 {
        rl_t *new;
 
        ASSERT(type == RL_READER || type == RL_WRITER || type == RL_APPEND);
 
        new = kmem_alloc(sizeof (rl_t), KM_SLEEP);
-       new->r_zp = zp;
+       new->r_zrl = zrl;
        new->r_off = off;
        if (len + off < off)    /* overflow */
                len = UINT64_MAX - off;
@@ -441,18 +441,18 @@ zfs_range_lock(znode_t *zp, uint64_t off, uint64_t len, rl_type_t type)
        new->r_write_wanted = B_FALSE;
        new->r_read_wanted = B_FALSE;
 
-       mutex_enter(&zp->z_range_lock);
+       mutex_enter(&zrl->zr_mutex);
        if (type == RL_READER) {
                /*
                 * First check for the usual case of no locks
                 */
-               if (avl_numnodes(&zp->z_range_avl) == 0)
-                       avl_add(&zp->z_range_avl, new);
+               if (avl_numnodes(&zrl->zr_avl) == 0)
+                       avl_add(&zrl->zr_avl, new);
                else
-                       zfs_range_lock_reader(zp, new);
-       } else
-               zfs_range_lock_writer(zp, new); /* RL_WRITER or RL_APPEND */
-       mutex_exit(&zp->z_range_lock);
+                       zfs_range_lock_reader(zrl, new);
+       } else /* RL_WRITER or RL_APPEND */
+               zfs_range_lock_writer(zrl, new);
+       mutex_exit(&zrl->zr_mutex);
        return (new);
 }
 
@@ -474,9 +474,9 @@ zfs_range_free(void *arg)
  * Unlock a reader lock
  */
 static void
-zfs_range_unlock_reader(znode_t *zp, rl_t *remove, list_t *free_list)
+zfs_range_unlock_reader(zfs_rlock_t *zrl, rl_t *remove, list_t *free_list)
 {
-       avl_tree_t *tree = &zp->z_range_avl;
+       avl_tree_t *tree = &zrl->zr_avl;
        rl_t *rl, *next = NULL;
        uint64_t len;
 
@@ -543,7 +543,7 @@ zfs_range_unlock_reader(znode_t *zp, rl_t *remove, list_t *free_list)
 void
 zfs_range_unlock(rl_t *rl)
 {
-       znode_t *zp = rl->r_zp;
+       zfs_rlock_t *zrl = rl->r_zrl;
        list_t free_list;
        rl_t *free_rl;
 
@@ -552,10 +552,10 @@ zfs_range_unlock(rl_t *rl)
        ASSERT(!rl->r_proxy);
        list_create(&free_list, sizeof (rl_t), offsetof(rl_t, rl_node));
 
-       mutex_enter(&zp->z_range_lock);
+       mutex_enter(&zrl->zr_mutex);
        if (rl->r_type == RL_WRITER) {
                /* writer locks can't be shared or split */
-               avl_remove(&zp->z_range_avl, rl);
+               avl_remove(&zrl->zr_avl, rl);
                if (rl->r_write_wanted)
                        cv_broadcast(&rl->r_wr_cv);
 
@@ -568,9 +568,9 @@ zfs_range_unlock(rl_t *rl)
                 * lock may be shared, let zfs_range_unlock_reader()
                 * release the zp->z_range_lock lock and free the rl_t
                 */
-               zfs_range_unlock_reader(zp, rl, &free_list);
+               zfs_range_unlock_reader(zrl, rl, &free_list);
        }
-       mutex_exit(&zp->z_range_lock);
+       mutex_exit(&zrl->zr_mutex);
 
        while ((free_rl = list_head(&free_list)) != NULL) {
                list_remove(&free_list, free_rl);
@@ -588,17 +588,17 @@ zfs_range_unlock(rl_t *rl)
 void
 zfs_range_reduce(rl_t *rl, uint64_t off, uint64_t len)
 {
-       znode_t *zp = rl->r_zp;
+       zfs_rlock_t *zrl = rl->r_zrl;
 
        /* Ensure there are no other locks */
-       ASSERT(avl_numnodes(&zp->z_range_avl) == 1);
+       ASSERT(avl_numnodes(&zrl->zr_avl) == 1);
        ASSERT(rl->r_off == 0);
        ASSERT(rl->r_type == RL_WRITER);
        ASSERT(!rl->r_proxy);
        ASSERT3U(rl->r_len, ==, UINT64_MAX);
        ASSERT3U(rl->r_cnt, ==, 1);
 
-       mutex_enter(&zp->z_range_lock);
+       mutex_enter(&zrl->zr_mutex);
        rl->r_off = off;
        rl->r_len = len;
 
@@ -607,7 +607,7 @@ zfs_range_reduce(rl_t *rl, uint64_t off, uint64_t len)
        if (rl->r_read_wanted)
                cv_broadcast(&rl->r_rd_cv);
 
-       mutex_exit(&zp->z_range_lock);
+       mutex_exit(&zrl->zr_mutex);
 }
 
 /*
@@ -626,3 +626,10 @@ zfs_range_compare(const void *arg1, const void *arg2)
                return (-1);
        return (0);
 }
+
+#ifdef _KERNEL
+EXPORT_SYMBOL(zfs_range_lock);
+EXPORT_SYMBOL(zfs_range_unlock);
+EXPORT_SYMBOL(zfs_range_reduce);
+EXPORT_SYMBOL(zfs_range_compare);
+#endif
index 7d8332ac8580308b502b3fb51199331d61c5c8e2..b9f1715b538ed9e0061f23ab517a97b1fd93e30b 100644 (file)
@@ -1124,8 +1124,7 @@ zfs_root(zfs_sb_t *zsb, struct inode **ipp)
 }
 EXPORT_SYMBOL(zfs_root);
 
-#if !defined(HAVE_SPLIT_SHRINKER_CALLBACK) && !defined(HAVE_SHRINK) && \
-       defined(HAVE_D_PRUNE_ALIASES)
+#ifdef HAVE_D_PRUNE_ALIASES
 /*
  * Linux kernels older than 3.1 do not support a per-filesystem shrinker.
  * To accommodate this we must improvise and manually walk the list of znodes
@@ -1215,15 +1214,29 @@ zfs_sb_prune(struct super_block *sb, unsigned long nr_to_scan, int *objects)
        } else {
                        *objects = (*shrinker->scan_objects)(shrinker, &sc);
        }
+
 #elif defined(HAVE_SPLIT_SHRINKER_CALLBACK)
        *objects = (*shrinker->scan_objects)(shrinker, &sc);
 #elif defined(HAVE_SHRINK)
        *objects = (*shrinker->shrink)(shrinker, &sc);
 #elif defined(HAVE_D_PRUNE_ALIASES)
+#define        D_PRUNE_ALIASES_IS_DEFAULT
        *objects = zfs_sb_prune_aliases(zsb, nr_to_scan);
 #else
 #error "No available dentry and inode cache pruning mechanism."
 #endif
+
+#if defined(HAVE_D_PRUNE_ALIASES) && !defined(D_PRUNE_ALIASES_IS_DEFAULT)
+#undef D_PRUNE_ALIASES_IS_DEFAULT
+       /*
+        * Fall back to zfs_sb_prune_aliases if the kernel's per-superblock
+        * shrinker couldn't free anything, possibly due to the inodes being
+        * allocated in a different memcg.
+        */
+       if (*objects == 0)
+               *objects = zfs_sb_prune_aliases(zsb, nr_to_scan);
+#endif
+
        ZFS_EXIT(zsb);
 
        dprintf_ds(zsb->z_os->os_dsl_dataset,
@@ -1601,6 +1614,14 @@ zfs_vget(struct super_block *sb, struct inode **ipp, fid_t *fidp)
                ZFS_EXIT(zsb);
                return (err);
        }
+
+       /* Don't export xattr stuff */
+       if (zp->z_pflags & ZFS_XATTR) {
+               iput(ZTOI(zp));
+               ZFS_EXIT(zsb);
+               return (SET_ERROR(ENOENT));
+       }
+
        (void) sa_lookup(zp->z_sa_hdl, SA_ZPL_GEN(zsb), &zp_gen,
            sizeof (uint64_t));
        zp_gen = zp_gen & gen_mask;
@@ -1613,7 +1634,7 @@ zfs_vget(struct super_block *sb, struct inode **ipp, fid_t *fidp)
                    fid_gen);
                iput(ZTOI(zp));
                ZFS_EXIT(zsb);
-               return (SET_ERROR(EINVAL));
+               return (SET_ERROR(ENOENT));
        }
 
        *ipp = ZTOI(zp);
index 43c3a3c20434a74d86f145eb3f446f19e4b215e1..960df25bcc810c9eda1cbe019a685e23a70a213a 100644 (file)
@@ -481,7 +481,8 @@ zfs_read(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
        /*
         * Lock the range against changes.
         */
-       rl = zfs_range_lock(zp, uio->uio_loffset, uio->uio_resid, RL_READER);
+       rl = zfs_range_lock(&zp->z_range_lock, uio->uio_loffset, uio->uio_resid,
+           RL_READER);
 
        /*
         * If we are reading past end-of-file we can skip
@@ -663,7 +664,7 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
                 * Obtain an appending range lock to guarantee file append
                 * semantics.  We reset the write offset once we have the lock.
                 */
-               rl = zfs_range_lock(zp, 0, n, RL_APPEND);
+               rl = zfs_range_lock(&zp->z_range_lock, 0, n, RL_APPEND);
                woff = rl->r_off;
                if (rl->r_len == UINT64_MAX) {
                        /*
@@ -680,7 +681,7 @@ zfs_write(struct inode *ip, uio_t *uio, int ioflag, cred_t *cr)
                 * this write, then this range lock will lock the entire file
                 * so that we can re-write the block safely.
                 */
-               rl = zfs_range_lock(zp, woff, n, RL_WRITER);
+               rl = zfs_range_lock(&zp->z_range_lock, woff, n, RL_WRITER);
        }
 
        if (woff >= limit) {
@@ -1007,7 +1008,8 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio)
         * we don't have to write the data twice.
         */
        if (buf != NULL) { /* immediate write */
-               zgd->zgd_rl = zfs_range_lock(zp, offset, size, RL_READER);
+               zgd->zgd_rl = zfs_range_lock(&zp->z_range_lock, offset, size,
+                   RL_READER);
                /* test for truncation needs to be done while range locked */
                if (offset >= zp->z_size) {
                        error = SET_ERROR(ENOENT);
@@ -1028,8 +1030,8 @@ zfs_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio)
                        size = zp->z_blksz;
                        blkoff = ISP2(size) ? P2PHASE(offset, size) : offset;
                        offset -= blkoff;
-                       zgd->zgd_rl = zfs_range_lock(zp, offset, size,
-                           RL_READER);
+                       zgd->zgd_rl = zfs_range_lock(&zp->z_range_lock, offset,
+                           size, RL_READER);
                        if (zp->z_blksz == size)
                                break;
                        offset += blkoff;
@@ -3947,7 +3949,7 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc)
        redirty_page_for_writepage(wbc, pp);
        unlock_page(pp);
 
-       rl = zfs_range_lock(zp, pgoff, pglen, RL_WRITER);
+       rl = zfs_range_lock(&zp->z_range_lock, pgoff, pglen, RL_WRITER);
        lock_page(pp);
 
        /* Page mapping changed or it was no longer dirty, we're done */
@@ -4192,10 +4194,10 @@ zfs_fillpage(struct inode *ip, struct page *pl[], int nr_pages)
         * Iterate over list of pages and read each page individually.
         */
        page_idx = 0;
-       cur_pp   = pl[0];
        for (total = io_off + io_len; io_off < total; io_off += PAGESIZE) {
                caddr_t va;
 
+               cur_pp = pl[page_idx++];
                va = kmap(cur_pp);
                err = dmu_read(os, zp->z_id, io_off, PAGESIZE, va,
                    DMU_READ_PREFETCH);
@@ -4206,7 +4208,6 @@ zfs_fillpage(struct inode *ip, struct page *pl[], int nr_pages)
                                err = SET_ERROR(EIO);
                        return (err);
                }
-               cur_pp = pl[++page_idx];
        }
 
        return (0);
index 1742a51ee655ccb4c301070a0da0fa7649dc65a5..eac9ce486d9be51e62f2087305aad71a0f0c87fb 100644 (file)
@@ -113,14 +113,11 @@ zfs_znode_cache_constructor(void *buf, void *arg, int kmflags)
        mutex_init(&zp->z_acl_lock, NULL, MUTEX_DEFAULT, NULL);
        rw_init(&zp->z_xattr_lock, NULL, RW_DEFAULT, NULL);
 
-       mutex_init(&zp->z_range_lock, NULL, MUTEX_DEFAULT, NULL);
-       avl_create(&zp->z_range_avl, zfs_range_compare,
-           sizeof (rl_t), offsetof(rl_t, r_node));
+       zfs_rlock_init(&zp->z_range_lock);
 
        zp->z_dirlocks = NULL;
        zp->z_acl_cached = NULL;
        zp->z_xattr_cached = NULL;
-       zp->z_xattr_parent = NULL;
        zp->z_moved = 0;
        return (0);
 }
@@ -137,13 +134,11 @@ zfs_znode_cache_destructor(void *buf, void *arg)
        rw_destroy(&zp->z_name_lock);
        mutex_destroy(&zp->z_acl_lock);
        rw_destroy(&zp->z_xattr_lock);
-       avl_destroy(&zp->z_range_avl);
-       mutex_destroy(&zp->z_range_lock);
+       zfs_rlock_destroy(&zp->z_range_lock);
 
        ASSERT(zp->z_dirlocks == NULL);
        ASSERT(zp->z_acl_cached == NULL);
        ASSERT(zp->z_xattr_cached == NULL);
-       ASSERT(zp->z_xattr_parent == NULL);
 }
 
 static int
@@ -435,11 +430,6 @@ zfs_inode_destroy(struct inode *ip)
                zp->z_xattr_cached = NULL;
        }
 
-       if (zp->z_xattr_parent) {
-               zfs_iput_async(ZTOI(zp->z_xattr_parent));
-               zp->z_xattr_parent = NULL;
-       }
-
        kmem_cache_free(znode_cache, zp);
 }
 
@@ -501,8 +491,7 @@ zfs_inode_set_ops(zfs_sb_t *zsb, struct inode *ip)
  */
 static znode_t *
 zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz,
-    dmu_object_type_t obj_type, uint64_t obj, sa_handle_t *hdl,
-    struct inode *dip)
+    dmu_object_type_t obj_type, uint64_t obj, sa_handle_t *hdl)
 {
        znode_t *zp;
        struct inode *ip;
@@ -521,7 +510,6 @@ zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz,
        ASSERT(zp->z_dirlocks == NULL);
        ASSERT3P(zp->z_acl_cached, ==, NULL);
        ASSERT3P(zp->z_xattr_cached, ==, NULL);
-       ASSERT3P(zp->z_xattr_parent, ==, NULL);
        zp->z_moved = 0;
        zp->z_sa_hdl = NULL;
        zp->z_unlinked = 0;
@@ -531,10 +519,12 @@ zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz,
        zp->z_blksz = blksz;
        zp->z_seq = 0x7A4653;
        zp->z_sync_cnt = 0;
-       zp->z_is_zvol = B_FALSE;
        zp->z_is_mapped = B_FALSE;
        zp->z_is_ctldir = B_FALSE;
        zp->z_is_stale = B_FALSE;
+       zp->z_range_lock.zr_size = &zp->z_size;
+       zp->z_range_lock.zr_blksz = &zp->z_blksz;
+       zp->z_range_lock.zr_max_blksz = &ZTOZSB(zp)->z_max_blksz;
 
        zfs_znode_sa_init(zsb, zp, db, obj_type, hdl);
 
@@ -560,14 +550,6 @@ zfs_znode_alloc(zfs_sb_t *zsb, dmu_buf_t *db, int blksz,
 
        zp->z_mode = mode;
 
-       /*
-        * xattr znodes hold a reference on their unique parent
-        */
-       if (dip && zp->z_pflags & ZFS_XATTR) {
-               igrab(dip);
-               zp->z_xattr_parent = ITOZ(dip);
-       }
-
        ip->i_ino = obj;
        zfs_inode_update(zp);
        zfs_inode_set_ops(zsb, ip);
@@ -913,8 +895,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, dmu_tx_t *tx, cred_t *cr,
        VERIFY(sa_replace_all_by_template(sa_hdl, sa_attrs, cnt, tx) == 0);
 
        if (!(flag & IS_ROOT_NODE)) {
-               *zpp = zfs_znode_alloc(zsb, db, 0, obj_type, obj, sa_hdl,
-                   ZTOI(dzp));
+               *zpp = zfs_znode_alloc(zsb, db, 0, obj_type, obj, sa_hdl);
                VERIFY(*zpp != NULL);
                VERIFY(dzp != NULL);
        } else {
@@ -1124,7 +1105,7 @@ again:
         * bonus buffer.
         */
        zp = zfs_znode_alloc(zsb, db, doi.doi_data_block_size,
-           doi.doi_bonus_type, obj_num, NULL, NULL);
+           doi.doi_bonus_type, obj_num, NULL);
        if (zp == NULL) {
                err = SET_ERROR(ENOENT);
        } else {
@@ -1148,6 +1129,16 @@ zfs_rezget(znode_t *zp)
        uint64_t gen;
        znode_hold_t *zh;
 
+       /*
+        * skip ctldir, otherwise they will always get invalidated. This will
+        * cause funny behaviour for the mounted snapdirs. Especially for
+        * Linux >= 3.18, d_invalidate will detach the mountpoint and prevent
+        * anyone automount it again as long as someone is still using the
+        * detached mount.
+        */
+       if (zp->z_is_ctldir)
+               return (0);
+
        zh = zfs_znode_hold_enter(zsb, obj_num);
 
        mutex_enter(&zp->z_acl_lock);
@@ -1162,11 +1153,6 @@ zfs_rezget(znode_t *zp)
                nvlist_free(zp->z_xattr_cached);
                zp->z_xattr_cached = NULL;
        }
-
-       if (zp->z_xattr_parent) {
-               zfs_iput_async(ZTOI(zp->z_xattr_parent));
-               zp->z_xattr_parent = NULL;
-       }
        rw_exit(&zp->z_xattr_lock);
 
        ASSERT(zp->z_sa_hdl == NULL);
@@ -1437,7 +1423,7 @@ zfs_extend(znode_t *zp, uint64_t end)
        /*
         * We will change zp_size, lock the whole file.
         */
-       rl = zfs_range_lock(zp, 0, UINT64_MAX, RL_WRITER);
+       rl = zfs_range_lock(&zp->z_range_lock, 0, UINT64_MAX, RL_WRITER);
 
        /*
         * Nothing to do if file already at desired length.
@@ -1554,7 +1540,7 @@ zfs_free_range(znode_t *zp, uint64_t off, uint64_t len)
        /*
         * Lock the range being freed.
         */
-       rl = zfs_range_lock(zp, off, len, RL_WRITER);
+       rl = zfs_range_lock(&zp->z_range_lock, off, len, RL_WRITER);
 
        /*
         * Nothing to do if file already at desired length.
@@ -1636,7 +1622,7 @@ zfs_trunc(znode_t *zp, uint64_t end)
        /*
         * We will change zp_size, lock the whole file.
         */
-       rl = zfs_range_lock(zp, 0, UINT64_MAX, RL_WRITER);
+       rl = zfs_range_lock(&zp->z_range_lock, 0, UINT64_MAX, RL_WRITER);
 
        /*
         * Nothing to do if file already at desired length.
index dd02e9e99465f2c663e7f9d34a39fe02946201eb..069834eae662eca2e3976ea961f75b82ebe2ceee 100644 (file)
@@ -81,7 +81,7 @@ out:
        return (error);
 }
 
-#if !defined(HAVE_VFS_ITERATE)
+#if !defined(HAVE_VFS_ITERATE) && !defined(HAVE_VFS_ITERATE_SHARED)
 static int
 zpl_root_readdir(struct file *filp, void *dirent, filldir_t filldir)
 {
@@ -144,7 +144,9 @@ const struct file_operations zpl_fops_root = {
        .open           = zpl_common_open,
        .llseek         = generic_file_llseek,
        .read           = generic_read_dir,
-#ifdef HAVE_VFS_ITERATE
+#ifdef HAVE_VFS_ITERATE_SHARED
+       .iterate_shared = zpl_root_iterate,
+#elif defined(HAVE_VFS_ITERATE)
        .iterate        = zpl_root_iterate,
 #else
        .readdir        = zpl_root_readdir,
@@ -285,7 +287,7 @@ out:
        return (error);
 }
 
-#if !defined(HAVE_VFS_ITERATE)
+#if !defined(HAVE_VFS_ITERATE) && !defined(HAVE_VFS_ITERATE_SHARED)
 static int
 zpl_snapdir_readdir(struct file *filp, void *dirent, filldir_t filldir)
 {
@@ -385,7 +387,9 @@ const struct file_operations zpl_fops_snapdir = {
        .open           = zpl_common_open,
        .llseek         = generic_file_llseek,
        .read           = generic_read_dir,
-#ifdef HAVE_VFS_ITERATE
+#ifdef HAVE_VFS_ITERATE_SHARED
+       .iterate_shared = zpl_snapdir_iterate,
+#elif defined(HAVE_VFS_ITERATE)
        .iterate        = zpl_snapdir_iterate,
 #else
        .readdir        = zpl_snapdir_readdir,
@@ -472,7 +476,7 @@ out:
        return (error);
 }
 
-#if !defined(HAVE_VFS_ITERATE)
+#if !defined(HAVE_VFS_ITERATE) && !defined(HAVE_VFS_ITERATE_SHARED)
 static int
 zpl_shares_readdir(struct file *filp, void *dirent, filldir_t filldir)
 {
@@ -525,7 +529,9 @@ const struct file_operations zpl_fops_shares = {
        .open           = zpl_common_open,
        .llseek         = generic_file_llseek,
        .read           = generic_read_dir,
-#ifdef HAVE_VFS_ITERATE
+#ifdef HAVE_VFS_ITERATE_SHARED
+       .iterate_shared = zpl_shares_iterate,
+#elif defined(HAVE_VFS_ITERATE)
        .iterate        = zpl_shares_iterate,
 #else
        .readdir        = zpl_shares_readdir,
index 5c430c7ca801d1647b8103c1191b273f22582303..a629b59dc996adf212e333a7e130bddbced01a89 100644 (file)
@@ -93,7 +93,7 @@ zpl_iterate(struct file *filp, struct dir_context *ctx)
        return (error);
 }
 
-#if !defined(HAVE_VFS_ITERATE)
+#if !defined(HAVE_VFS_ITERATE) && !defined(HAVE_VFS_ITERATE_SHARED)
 static int
 zpl_readdir(struct file *filp, void *dirent, filldir_t filldir)
 {
@@ -419,13 +419,13 @@ zpl_llseek(struct file *filp, loff_t offset, int whence)
                loff_t maxbytes = ip->i_sb->s_maxbytes;
                loff_t error;
 
-               spl_inode_lock(ip);
+               spl_inode_lock_shared(ip);
                cookie = spl_fstrans_mark();
                error = -zfs_holey(ip, whence, &offset);
                spl_fstrans_unmark(cookie);
                if (error == 0)
                        error = lseek_execute(filp, ip, offset, maxbytes);
-               spl_inode_unlock(ip);
+               spl_inode_unlock_shared(ip);
 
                return (error);
        }
@@ -851,7 +851,9 @@ const struct file_operations zpl_file_operations = {
 const struct file_operations zpl_dir_file_operations = {
        .llseek         = generic_file_llseek,
        .read           = generic_read_dir,
-#ifdef HAVE_VFS_ITERATE
+#ifdef HAVE_VFS_ITERATE_SHARED
+       .iterate_shared = zpl_iterate,
+#elif defined(HAVE_VFS_ITERATE)
        .iterate        = zpl_iterate,
 #else
        .readdir        = zpl_readdir,
index bcdbbd69e2808e56d8b6588f9ed77aab19b5b745..91c36c9e3675f796b4318a8556631ba8baa5cca5 100644 (file)
@@ -336,12 +336,12 @@ zpl_parse_options(char *osname, char *mntopts, zfs_mntopts_t *zmo,
 
        if (mntopts) {
                substring_t args[MAX_OPT_ARGS];
-               char *tmp_mntopts, *p;
+               char *tmp_mntopts, *p, *t;
                int token;
 
-               tmp_mntopts = strdup(mntopts);
+               t = tmp_mntopts = strdup(mntopts);
 
-               while ((p = strsep(&tmp_mntopts, ",")) != NULL) {
+               while ((p = strsep(&t, ",")) != NULL) {
                        if (!*p)
                                continue;
 
index 1a15d4d619a2e357455c76e8b51ccd5aede171aa..f14dd1a5251d067ec3cfadefb114c8a7ce72f2e0 100644 (file)
@@ -1017,11 +1017,16 @@ zpl_get_acl(struct inode *ip, int type)
        char *name;
        int size;
 
-#ifdef HAVE_POSIX_ACL_CACHING
+       /*
+        * As of Linux 3.14, the kernel get_acl will check this for us.
+        * Also as of Linux 4.7, comparing against ACL_NOT_CACHED is wrong
+        * as the kernel get_acl will set it to temporary sentinel value.
+        */
+#ifndef HAVE_KERNEL_GET_ACL_HANDLE_CACHE
        acl = get_cached_acl(ip, type);
        if (acl != ACL_NOT_CACHED)
                return (acl);
-#endif /* HAVE_POSIX_ACL_CACHING */
+#endif
 
        switch (type) {
        case ACL_TYPE_ACCESS:
@@ -1051,8 +1056,11 @@ zpl_get_acl(struct inode *ip, int type)
        if (size > 0)
                kmem_free(value, size);
 
+       /* As of Linux 4.7, the kernel get_acl will set this for us */
+#ifndef HAVE_KERNEL_GET_ACL_HANDLE_CACHE
        if (!IS_ERR(acl))
                zpl_set_cached_acl(ip, type, acl);
+#endif
 
        return (acl);
 }
@@ -1290,7 +1298,7 @@ __zpl_xattr_acl_set_access(struct inode *ip, const char *name,
                if (IS_ERR(acl))
                        return (PTR_ERR(acl));
                else if (acl) {
-                       error = posix_acl_valid(acl);
+                       error = zpl_posix_acl_valid(ip, acl);
                        if (error) {
                                zpl_posix_acl_release(acl);
                                return (error);
@@ -1330,7 +1338,7 @@ __zpl_xattr_acl_set_default(struct inode *ip, const char *name,
                if (IS_ERR(acl))
                        return (PTR_ERR(acl));
                else if (acl) {
-                       error = posix_acl_valid(acl);
+                       error = zpl_posix_acl_valid(ip, acl);
                        if (error) {
                                zpl_posix_acl_release(acl);
                                return (error);
index a7a79e6ddbe8dad6300124fcdb556bf99e58571f..04f68b5f8b70d571f458f7c6ecfb322fc29b7f02 100644 (file)
@@ -74,7 +74,7 @@ typedef struct zvol_state {
        uint32_t                zv_open_count;  /* open counts */
        uint32_t                zv_changed;     /* disk changed */
        zilog_t                 *zv_zilog;      /* ZIL handle */
-       znode_t                 zv_znode;       /* for range locking */
+       zfs_rlock_t             zv_range_lock;  /* range lock */
        dmu_buf_t               *zv_dbuf;       /* bonus handle */
        dev_t                   zv_dev;         /* device id */
        struct gendisk          *zv_disk;       /* generic disk */
@@ -623,7 +623,7 @@ zvol_write(struct bio *bio)
 
        ASSERT(zv && zv->zv_open_count > 0);
 
-       if (bio->bi_rw & VDEV_REQ_FLUSH)
+       if (bio_is_flush(bio))
                zil_commit(zv->zv_zilog, ZVOL_OBJ);
 
        /*
@@ -632,7 +632,7 @@ zvol_write(struct bio *bio)
        if (size == 0)
                goto out;
 
-       rl = zfs_range_lock(&zv->zv_znode, offset, size, RL_WRITER);
+       rl = zfs_range_lock(&zv->zv_range_lock, offset, size, RL_WRITER);
 
        tx = dmu_tx_create(zv->zv_objset);
        dmu_tx_hold_write(tx, ZVOL_OBJ, offset, size);
@@ -648,12 +648,12 @@ zvol_write(struct bio *bio)
        error = dmu_write_bio(zv->zv_objset, ZVOL_OBJ, bio, tx);
        if (error == 0)
                zvol_log_write(zv, tx, offset, size,
-                   !!(bio->bi_rw & VDEV_REQ_FUA));
+                   !!(bio_is_fua(bio)));
 
        dmu_tx_commit(tx);
        zfs_range_unlock(rl);
 
-       if ((bio->bi_rw & VDEV_REQ_FUA) ||
+       if ((bio_is_fua(bio)) ||
            zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS)
                zil_commit(zv->zv_zilog, ZVOL_OBJ);
 
@@ -677,32 +677,27 @@ zvol_discard(struct bio *bio)
                return (SET_ERROR(EIO));
 
        /*
-        * Align the request to volume block boundaries when REQ_SECURE is
-        * available, but not requested. If we don't, then this will force
-        * dnode_free_range() to zero out the unaligned parts, which is slow
-        * (read-modify-write) and useless since we are not freeing any space
-        * by doing so. Kernels that do not support REQ_SECURE (2.6.32 through
-        * 2.6.35) will not receive this optimization.
+        * Align the request to volume block boundaries when a secure erase is
+        * not required.  This will prevent dnode_free_range() from zeroing out
+        * the unaligned parts which is slow (read-modify-write) and useless
+        * since we are not freeing any space by doing so.
         */
-#ifdef REQ_SECURE
-       if (!(bio->bi_rw & REQ_SECURE)) {
+       if (!bio_is_secure_erase(bio)) {
                start = P2ROUNDUP(start, zv->zv_volblocksize);
                end = P2ALIGN(end, zv->zv_volblocksize);
                size = end - start;
        }
-#endif
 
        if (start >= end)
                return (0);
 
-       rl = zfs_range_lock(&zv->zv_znode, start, size, RL_WRITER);
+       rl = zfs_range_lock(&zv->zv_range_lock, start, size, RL_WRITER);
 
        error = dmu_free_long_range(zv->zv_objset, ZVOL_OBJ, start, size);
 
        /*
         * TODO: maybe we should add the operation to the log.
         */
-
        zfs_range_unlock(rl);
 
        return (error);
@@ -722,7 +717,7 @@ zvol_read(struct bio *bio)
        if (len == 0)
                return (0);
 
-       rl = zfs_range_lock(&zv->zv_znode, offset, len, RL_READER);
+       rl = zfs_range_lock(&zv->zv_range_lock, offset, len, RL_READER);
 
        error = dmu_read_bio(zv->zv_objset, ZVOL_OBJ, bio);
 
@@ -767,7 +762,7 @@ zvol_request(struct request_queue *q, struct bio *bio)
                        goto out2;
                }
 
-               if (bio->bi_rw & VDEV_REQ_DISCARD) {
+               if (bio_is_discard(bio) || bio_is_secure_erase(bio)) {
                        error = zvol_discard(bio);
                        goto out2;
                }
@@ -823,7 +818,8 @@ zvol_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio)
 
        zgd = (zgd_t *)kmem_zalloc(sizeof (zgd_t), KM_SLEEP);
        zgd->zgd_zilog = zv->zv_zilog;
-       zgd->zgd_rl = zfs_range_lock(&zv->zv_znode, offset, size, RL_READER);
+       zgd->zgd_rl = zfs_range_lock(&zv->zv_range_lock, offset, size,
+           RL_READER);
 
        /*
         * Write records come in two flavors: immediate and indirect.
@@ -1234,12 +1230,7 @@ zvol_alloc(dev_t dev, const char *name)
                goto out_kmem;
 
        blk_queue_make_request(zv->zv_queue, zvol_request);
-
-#ifdef HAVE_BLK_QUEUE_FLUSH
-       blk_queue_flush(zv->zv_queue, VDEV_REQ_FLUSH | VDEV_REQ_FUA);
-#else
-       blk_queue_ordered(zv->zv_queue, QUEUE_ORDERED_DRAIN, NULL);
-#endif /* HAVE_BLK_QUEUE_FLUSH */
+       blk_queue_set_write_cache(zv->zv_queue, B_TRUE, B_TRUE);
 
        zv->zv_disk = alloc_disk(ZVOL_MINORS);
        if (zv->zv_disk == NULL)
@@ -1250,10 +1241,7 @@ zvol_alloc(dev_t dev, const char *name)
        zv->zv_open_count = 0;
        strlcpy(zv->zv_name, name, MAXNAMELEN);
 
-       mutex_init(&zv->zv_znode.z_range_lock, NULL, MUTEX_DEFAULT, NULL);
-       avl_create(&zv->zv_znode.z_range_avl, zfs_range_compare,
-           sizeof (rl_t), offsetof(rl_t, r_node));
-       zv->zv_znode.z_is_zvol = TRUE;
+       zfs_rlock_init(&zv->zv_range_lock);
 
        zv->zv_disk->major = zvol_major;
        zv->zv_disk->first_minor = (dev & MINORMASK);
@@ -1282,8 +1270,7 @@ zvol_free(zvol_state_t *zv)
        ASSERT(MUTEX_HELD(&zvol_state_lock));
        ASSERT(zv->zv_open_count == 0);
 
-       avl_destroy(&zv->zv_znode.z_range_avl);
-       mutex_destroy(&zv->zv_znode.z_range_lock);
+       zfs_rlock_destroy(&zv->zv_range_lock);
 
        zv->zv_disk->private_data = NULL;
 
diff --git a/module/zpios/zpios.mod.c b/module/zpios/zpios.mod.c
deleted file mode 100644 (file)
index bc848b5..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#include <linux/module.h>
-#include <linux/vermagic.h>
-#include <linux/compiler.h>
-
-MODULE_INFO(vermagic, VERMAGIC_STRING);
-
-struct module __this_module
-__attribute__((section(".gnu.linkonce.this_module"))) = {
- .name = KBUILD_MODNAME,
- .init = init_module,
-#ifdef CONFIG_MODULE_UNLOAD
- .exit = cleanup_module,
-#endif
- .arch = MODULE_ARCH_INIT,
-};
-
-static const struct modversion_info ____versions[]
-__used
-__attribute__((section("__versions"))) = {
-       { 0x51198477, "module_layout" },
-       { 0x3a8fb147, "dmu_tx_hold_free" },
-       { 0x6b85513b, "dmu_objset_create" },
-       { 0x4d73bbca, "dmu_object_set_blocksize" },
-       { 0x26b64321, "call_usermodehelper_setfns" },
-       { 0xdb347c7a, "call_usermodehelper_exec" },
-       { 0xadaabe1b, "pv_lock_ops" },
-       { 0xbf479b07, "dmu_tx_abort" },
-       { 0x4ff1c9bc, "populate_rootfs_wait" },
-       { 0xc8b57c27, "autoremove_wake_function" },
-       { 0x79aa04a2, "get_random_bytes" },
-       { 0x67053080, "current_kernel_time" },
-       { 0x71642c98, "dmu_tx_wait" },
-       { 0xab140103, "spl_kmem_alloc" },
-       { 0xba2adaf, "mutex_unlock" },
-       { 0xd3b65d9d, "kthread_create_on_node" },
-       { 0xbc32eee7, "spl_panic" },
-       { 0x4040455, "dmu_tx_commit" },
-       { 0x6395be94, "__init_waitqueue_head" },
-       { 0x4f8b5ddb, "_copy_to_user" },
-       { 0x114258fb, "misc_register" },
-       { 0xde0bdcff, "memset" },
-       { 0x69371301, "current_task" },
-       { 0x87ebeb76, "__mutex_init" },
-       { 0x27e1a049, "printk" },
-       { 0x4ebec927, "kthread_stop" },
-       { 0x81034537, "dmu_objset_disown" },
-       { 0xa1c76e0a, "_cond_resched" },
-       { 0x7ec9bfbc, "strncpy" },
-       { 0xb4390f9a, "mcount" },
-       { 0xafe1db9d, "mutex_lock" },
-       { 0x5bb6ad4b, "spl_vmem_zalloc" },
-       { 0x6357a5a8, "dmu_write" },
-       { 0x952664c5, "do_exit" },
-       { 0x7da403ec, "dsl_destroy_head" },
-       { 0x699a8466, "dmu_objset_own" },
-       { 0x8c51c50b, "dmu_object_free" },
-       { 0xf0fdf6cb, "__stack_chk_fail" },
-       { 0xd62c833f, "schedule_timeout" },
-       { 0x1000e51, "schedule" },
-       { 0x252f790a, "dmu_object_alloc" },
-       { 0xdae80439, "spl_vmem_alloc" },
-       { 0xcfa37f55, "wake_up_process" },
-       { 0xcd992a36, "dmu_tx_create" },
-       { 0xd52bf1ce, "_raw_spin_lock" },
-       { 0xcf21d241, "__wake_up" },
-       { 0x659a64d0, "call_usermodehelper_setup" },
-       { 0x236c8c64, "memcpy" },
-       { 0x5c8b5ce8, "prepare_to_wait" },
-       { 0xfa66f77c, "finish_wait" },
-       { 0xf005a1c7, "dmu_tx_assign" },
-       { 0x50720c5f, "snprintf" },
-       { 0x80c3f220, "spl_kmem_free" },
-       { 0xe55595ee, "dmu_read" },
-       { 0x778a305, "spl_vmem_free" },
-       { 0x4f6b400b, "_copy_from_user" },
-       { 0x2482e688, "vsprintf" },
-       { 0xdfb0b5e5, "misc_deregister" },
-       { 0xa296a969, "dmu_tx_hold_write" },
-       { 0x9dcb88fc, "spl_kmem_zalloc" },
-};
-
-static const char __module_depends[]
-__used
-__attribute__((section(".modinfo"))) =
-"depends=zfs,spl";
-
-
-MODULE_INFO(srcversion, "6224A8554C1154556C8A26B");
index 978867460f66570bd1a43286a8cb717712394629..e7278b1c31d45dd08ca42b488dd834bf1efff1dd 100644 (file)
@@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 74305ec83dfec68fd07a92bf5c2b3cdeeecf1300..78620c8dd4942d806f37b3350030aea14909b144 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 3db3a27c328f8341bf8f8460d0effac418d68a7f..2f41d0bc1fbce76b2afc18d1763aa899a4acfa2e 100644 (file)
@@ -186,6 +186,46 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Fri Sep 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.8-1
+- Linux 4.6, 4.7 and 4.8 compatibility zfsonlinux/spl#549 zfsonlinux/spl#563 zfsonlinux/spl#565 zfsonlinux/spl#566 zfsonlinux/zfs#4664 zfsonlinux/zfs#4665 zfsonlinux/zfs#4717 zfsonlinux/zfs#4726 zfsonlinux/zfs#4892  zfsonlinux/zfs#4899 zfsonlinux/zfs#4922  zfsonlinux/zfs#4944  zfsonlinux/zfs#4946 zfsonlinux/zfs#4951
+- Fix new tunable to ignore hole_birth, enabled by default zfsonlinux/zfs#4833
+- Fix rw_tryupgrade() semantics zfsonlinux/spl#534 zfsonlinux/spl#554
+- Fix taskq_wait_outstanding() re-evaluation issue zfsonlinux/spl#553
+- Fix race between taskq_destroy and new spawning thread zfsonlinux/spl#550 zfsonlinux/spl#553
+- Fix handle NULL case in spl_kmem_free_track() zfsonlinux/spl#567
+- Fix persist vdev_resilver_txg changes zfsonlinux/zfs#4790
+- Fix array bounds read in zprop_print_one_property() zfsonlinux/zfs#5003
+- Fix call zfs_get_name() with invalid parameter zfsonlinux/zfs#4919
+- Fix incorrect pool state after import zfsonlinux/zfs#4948
+- Fix self-healing IO prior to dsl_pool_init() completion zfsonlinux/zfs#4652
+- Fix stack corruption after importing a pool with a too-long name zfsonlinux/zfs@dc4abb4
+- Fix deeply nested nvlist can overflow stack zfsonlinux/zfs#4924
+- Fix dbuf_stats_hash_table_data race zfsonlinux/zfs#4846
+- Fix NULL dereference when accessing dbuf kstat zfsonlinux/zfs#4837
+- Fix NFS fh_to_dentry() should return ESTALE when generation mismatch zfsonlinux/zfs#4828
+- Fix allowing accessing XATTR via export handle zfsonlinux/zfs#4828
+- Fix out-of-bound access in zfs_fillpage() zfsonlinux/zfs#4705 zfsonlinux/zfs#4708
+- Fix memleak in zpl_parse_options zfsonlinux/zfs#4706 zfsonlinux/zfs#4708
+- Fix arc_prune_task use-after-free zfsonlinux/zfs#4687 zfsonlinux/zfs#4690
+- Fix get_zfs_sb() race with concurrent umount zfsonlinux/zfs@5cff9a0
+- Fix xattr parent inode pinning zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix xattr purge during iput zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix metaslab_free_dva(): bad DVA X:Y:Z zfsonlinux/zfs#3937
+- Fix large kmem_alloc in vdev_metaslab_init zfsonlinux/zfs#4752
+- Fix snapdir by skipping ctldir znode in zfs_rezget zfsonlinux/zfs#4514 zfsonlinux/zfs#4661 zfsonlinux/zfs#4672
+- Fix libshare performance issue zfsonlinux/zfs#4119
+- Fix ztest truncated cache file zfsonlinux/zfs#4129
+- Fix obeying arc_meta_limit default size when changing arc_max zfsonlinux/zfs#4001
+- Fix bug in fix_paths() zfsonlinux/zfs#4632
+- Fix systemd configuration zfsonlinux/zfs#4325 zfsonlinux/zfs#4496 zfsonlinux/zfs#4658 zfsonlinux/zfs#4699
+- Fix use kernel provided mutex owner zfsonlinux/spl#540
+- Fix rename 'zed.service' to 'zfs-zed.service' zfsonlinux/zfs#3837
+- Add support for MIPS zfsonlinux/spl#558
+- Add nfs-kernel-server for Debian zfsonlinux/zfs#4350
+- Remove HAVE_CURRENT_UMASK and HAVE_POSIX_ACL_CACHING zfsonlinux/zfs#4922
+- Remove dummy znode from zvol_state zfsonlinux/zfs#4510
+- Fix gcc -Warray-bounds check for dump_object() in zdb zfsonlinux/zfs#4907
+- Handle block pointers with a corrupt logical size zfsonlinux/zfs#4069 zfsonlinux/zfs#4080
 * Thu May 12 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.7-1
 - Fix user namespaces uid/gid mapping zfsonlinux/zfs#4177
 - Fix ZPL miswrite of default POSIX ACL zfsonlinux/zfs#4520
index f62cc0e09208092f31aad3363d778937843a80d9..d02826e24d9bcc0e12c420c89abb0efd58f098c2 100644 (file)
@@ -327,6 +327,46 @@ exit 0
 %endif
 
 %changelog
+* Fri Sep 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.8-1
+- Linux 4.6, 4.7 and 4.8 compatibility zfsonlinux/spl#549 zfsonlinux/spl#563 zfsonlinux/spl#565 zfsonlinux/spl#566 zfsonlinux/zfs#4664 zfsonlinux/zfs#4665 zfsonlinux/zfs#4717 zfsonlinux/zfs#4726 zfsonlinux/zfs#4892  zfsonlinux/zfs#4899 zfsonlinux/zfs#4922  zfsonlinux/zfs#4944  zfsonlinux/zfs#4946 zfsonlinux/zfs#4951
+- Fix new tunable to ignore hole_birth, enabled by default zfsonlinux/zfs#4833
+- Fix rw_tryupgrade() semantics zfsonlinux/spl#534 zfsonlinux/spl#554
+- Fix taskq_wait_outstanding() re-evaluation issue zfsonlinux/spl#553
+- Fix race between taskq_destroy and new spawning thread zfsonlinux/spl#550 zfsonlinux/spl#553
+- Fix handle NULL case in spl_kmem_free_track() zfsonlinux/spl#567
+- Fix persist vdev_resilver_txg changes zfsonlinux/zfs#4790
+- Fix array bounds read in zprop_print_one_property() zfsonlinux/zfs#5003
+- Fix call zfs_get_name() with invalid parameter zfsonlinux/zfs#4919
+- Fix incorrect pool state after import zfsonlinux/zfs#4948
+- Fix self-healing IO prior to dsl_pool_init() completion zfsonlinux/zfs#4652
+- Fix stack corruption after importing a pool with a too-long name zfsonlinux/zfs@dc4abb4
+- Fix deeply nested nvlist can overflow stack zfsonlinux/zfs#4924
+- Fix dbuf_stats_hash_table_data race zfsonlinux/zfs#4846
+- Fix NULL dereference when accessing dbuf kstat zfsonlinux/zfs#4837
+- Fix NFS fh_to_dentry() should return ESTALE when generation mismatch zfsonlinux/zfs#4828
+- Fix allowing accessing XATTR via export handle zfsonlinux/zfs#4828
+- Fix out-of-bound access in zfs_fillpage() zfsonlinux/zfs#4705 zfsonlinux/zfs#4708
+- Fix memleak in zpl_parse_options zfsonlinux/zfs#4706 zfsonlinux/zfs#4708
+- Fix arc_prune_task use-after-free zfsonlinux/zfs#4687 zfsonlinux/zfs#4690
+- Fix get_zfs_sb() race with concurrent umount zfsonlinux/zfs@5cff9a0
+- Fix xattr parent inode pinning zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix xattr purge during iput zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix metaslab_free_dva(): bad DVA X:Y:Z zfsonlinux/zfs#3937
+- Fix large kmem_alloc in vdev_metaslab_init zfsonlinux/zfs#4752
+- Fix snapdir by skipping ctldir znode in zfs_rezget zfsonlinux/zfs#4514 zfsonlinux/zfs#4661 zfsonlinux/zfs#4672
+- Fix libshare performance issue zfsonlinux/zfs#4119
+- Fix ztest truncated cache file zfsonlinux/zfs#4129
+- Fix obeying arc_meta_limit default size when changing arc_max zfsonlinux/zfs#4001
+- Fix bug in fix_paths() zfsonlinux/zfs#4632
+- Fix systemd configuration zfsonlinux/zfs#4325 zfsonlinux/zfs#4496 zfsonlinux/zfs#4658 zfsonlinux/zfs#4699
+- Fix use kernel provided mutex owner zfsonlinux/spl#540
+- Fix rename 'zed.service' to 'zfs-zed.service' zfsonlinux/zfs#3837
+- Add support for MIPS zfsonlinux/spl#558
+- Add nfs-kernel-server for Debian zfsonlinux/zfs#4350
+- Remove HAVE_CURRENT_UMASK and HAVE_POSIX_ACL_CACHING zfsonlinux/zfs#4922
+- Remove dummy znode from zvol_state zfsonlinux/zfs#4510
+- Fix gcc -Warray-bounds check for dump_object() in zdb zfsonlinux/zfs#4907
+- Handle block pointers with a corrupt logical size zfsonlinux/zfs#4069 zfsonlinux/zfs#4080
 * Thu May 12 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.7-1
 - Fix user namespaces uid/gid mapping zfsonlinux/zfs#4177
 - Fix ZPL miswrite of default POSIX ACL zfsonlinux/zfs#4520
index 55f2da6ff671ca439a3a1fe6a72d3f1412878c73..f2127cd3e89a1e84ad4420e06f7ad72f3c22f6db 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index f62cc0e09208092f31aad3363d778937843a80d9..d02826e24d9bcc0e12c420c89abb0efd58f098c2 100644 (file)
@@ -327,6 +327,46 @@ exit 0
 %endif
 
 %changelog
+* Fri Sep 9 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.8-1
+- Linux 4.6, 4.7 and 4.8 compatibility zfsonlinux/spl#549 zfsonlinux/spl#563 zfsonlinux/spl#565 zfsonlinux/spl#566 zfsonlinux/zfs#4664 zfsonlinux/zfs#4665 zfsonlinux/zfs#4717 zfsonlinux/zfs#4726 zfsonlinux/zfs#4892  zfsonlinux/zfs#4899 zfsonlinux/zfs#4922  zfsonlinux/zfs#4944  zfsonlinux/zfs#4946 zfsonlinux/zfs#4951
+- Fix new tunable to ignore hole_birth, enabled by default zfsonlinux/zfs#4833
+- Fix rw_tryupgrade() semantics zfsonlinux/spl#534 zfsonlinux/spl#554
+- Fix taskq_wait_outstanding() re-evaluation issue zfsonlinux/spl#553
+- Fix race between taskq_destroy and new spawning thread zfsonlinux/spl#550 zfsonlinux/spl#553
+- Fix handle NULL case in spl_kmem_free_track() zfsonlinux/spl#567
+- Fix persist vdev_resilver_txg changes zfsonlinux/zfs#4790
+- Fix array bounds read in zprop_print_one_property() zfsonlinux/zfs#5003
+- Fix call zfs_get_name() with invalid parameter zfsonlinux/zfs#4919
+- Fix incorrect pool state after import zfsonlinux/zfs#4948
+- Fix self-healing IO prior to dsl_pool_init() completion zfsonlinux/zfs#4652
+- Fix stack corruption after importing a pool with a too-long name zfsonlinux/zfs@dc4abb4
+- Fix deeply nested nvlist can overflow stack zfsonlinux/zfs#4924
+- Fix dbuf_stats_hash_table_data race zfsonlinux/zfs#4846
+- Fix NULL dereference when accessing dbuf kstat zfsonlinux/zfs#4837
+- Fix NFS fh_to_dentry() should return ESTALE when generation mismatch zfsonlinux/zfs#4828
+- Fix allowing accessing XATTR via export handle zfsonlinux/zfs#4828
+- Fix out-of-bound access in zfs_fillpage() zfsonlinux/zfs#4705 zfsonlinux/zfs#4708
+- Fix memleak in zpl_parse_options zfsonlinux/zfs#4706 zfsonlinux/zfs#4708
+- Fix arc_prune_task use-after-free zfsonlinux/zfs#4687 zfsonlinux/zfs#4690
+- Fix get_zfs_sb() race with concurrent umount zfsonlinux/zfs@5cff9a0
+- Fix xattr parent inode pinning zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix xattr purge during iput zfsonlinux/zfs#4359 zfsonlinux/zfs#3508 zfsonlinux/zfs#4413 zfsonlinux/zfs#4827
+- Fix metaslab_free_dva(): bad DVA X:Y:Z zfsonlinux/zfs#3937
+- Fix large kmem_alloc in vdev_metaslab_init zfsonlinux/zfs#4752
+- Fix snapdir by skipping ctldir znode in zfs_rezget zfsonlinux/zfs#4514 zfsonlinux/zfs#4661 zfsonlinux/zfs#4672
+- Fix libshare performance issue zfsonlinux/zfs#4119
+- Fix ztest truncated cache file zfsonlinux/zfs#4129
+- Fix obeying arc_meta_limit default size when changing arc_max zfsonlinux/zfs#4001
+- Fix bug in fix_paths() zfsonlinux/zfs#4632
+- Fix systemd configuration zfsonlinux/zfs#4325 zfsonlinux/zfs#4496 zfsonlinux/zfs#4658 zfsonlinux/zfs#4699
+- Fix use kernel provided mutex owner zfsonlinux/spl#540
+- Fix rename 'zed.service' to 'zfs-zed.service' zfsonlinux/zfs#3837
+- Add support for MIPS zfsonlinux/spl#558
+- Add nfs-kernel-server for Debian zfsonlinux/zfs#4350
+- Remove HAVE_CURRENT_UMASK and HAVE_POSIX_ACL_CACHING zfsonlinux/zfs#4922
+- Remove dummy znode from zvol_state zfsonlinux/zfs#4510
+- Fix gcc -Warray-bounds check for dump_object() in zdb zfsonlinux/zfs#4907
+- Handle block pointers with a corrupt logical size zfsonlinux/zfs#4069 zfsonlinux/zfs#4080
 * Thu May 12 2016 Ned Bass <bass6@llnl.gov> - 0.6.5.7-1
 - Fix user namespaces uid/gid mapping zfsonlinux/zfs#4177
 - Fix ZPL miswrite of default POSIX ACL zfsonlinux/zfs#4520
index be71b304c61deb94e53df29ea7b3193f52e7a29b..34fa6e56e6770091a1101f10daf1a835d44768b1 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index ed6641a0d4477ba3cc127994dafbc8173521dccc..bf6ee46cc4bbfd76a6790b9268be7a6b33f1df77 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index d9a0662a3ca9a34b3c203f9aba85738e27deaf0b..df9979fc7341efdf5566f3b97323ae044f3e233b 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index b460c81917ec1b2ad5327e87ccc1d5476d06f87d..9e0c050cd09bd0a96e240b02f4043035add1c0cd 100644 (file)
@@ -50,6 +50,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -100,6 +101,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index bdb9d7d390603e6006f479c45859ccd0c66596fc..296b1f861e42806885137a8903d62764ee02ae15 100644 (file)
@@ -48,6 +48,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -98,6 +99,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index 52374a58d199395bb2942d0a327c57c065447581..b427873e43b97e14c2032ae7f2177ed8122509d9 100644 (file)
@@ -49,6 +49,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-bio-bvec-iter.m4 \
        $(top_srcdir)/config/kernel-bio-end-io-t-args.m4 \
        $(top_srcdir)/config/kernel-bio-failfast.m4 \
+       $(top_srcdir)/config/kernel-bio-op.m4 \
        $(top_srcdir)/config/kernel-bio-rw-barrier.m4 \
        $(top_srcdir)/config/kernel-bio-rw-discard.m4 \
        $(top_srcdir)/config/kernel-blk-queue-flush.m4 \
@@ -99,6 +100,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/always-no-bool-compare.m4 \
        $(top_srcdir)/config/kernel-sget-args.m4 \
        $(top_srcdir)/config/kernel-show-options.m4 \
        $(top_srcdir)/config/kernel-shrink.m4 \
+       $(top_srcdir)/config/kernel-submit_bio.m4 \
        $(top_srcdir)/config/kernel-truncate-range.m4 \
        $(top_srcdir)/config/kernel-truncate-setsize.m4 \
        $(top_srcdir)/config/kernel-vfs-iterate.m4 \
index f94b67fc4df3204f3b3d6453e00317d8b2a84553..c376d2203192b90a14d727a3ca66ed388c5a3718 100644 (file)
@@ -12,6 +12,9 @@
 /* kmap_atomic wants 1 args */
 #undef HAVE_1ARG_KMAP_ATOMIC
 
+/* submit_bio() wants 1 arg */
+#undef HAVE_1ARG_SUBMIT_BIO
+
 /* bdi_setup_and_register() wants 2 args */
 #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER
 
@@ -39,6 +42,9 @@
 /* bdev_physical_block_size() is available */
 #undef HAVE_BDEV_PHYSICAL_BLOCK_SIZE
 
+/* bio->bi_opf is defined */
+#undef HAVE_BIO_BI_OPF
+
 /* bio has bi_iter */
 #undef HAVE_BIO_BVEC_ITER
 
 /* blk_queue_max_segments() is available */
 #undef HAVE_BLK_QUEUE_MAX_SEGMENTS
 
+/* blk_queue_write_cache() exists */
+#undef HAVE_BLK_QUEUE_WRITE_CACHE
+
+/* blk_queue_write_cache() is GPL-only */
+#undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY
+
 /* struct block_device_operations.release returns void */
 #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID
 
 /* current->bio_tail exists */
 #undef HAVE_CURRENT_BIO_TAIL
 
-/* current_umask() exists */
-#undef HAVE_CURRENT_UMASK
-
 /* DECLARE_EVENT_CLASS() is available */
 #undef HAVE_DECLARE_EVENT_CLASS
 
 /* is_owner_or_cap() exists */
 #undef HAVE_IS_OWNER_OR_CAP
 
+/* uncached_acl_sentinel() exists */
+#undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE
+
 /* kernel defines KOBJ_NAME_LEN */
 #undef HAVE_KOBJ_NAME_LEN
 
 /* iops->permission() with nameidata exists */
 #undef HAVE_PERMISSION_WITH_NAMEIDATA
 
-/* inode contains i_acl and i_default_acl */
-#undef HAVE_POSIX_ACL_CACHING
-
 /* posix_acl_chmod() exists */
 #undef HAVE_POSIX_ACL_CHMOD
 
 /* posix_acl_release() is GPL-only */
 #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY
 
+/* posix_acl_valid() wants user namespace */
+#undef HAVE_POSIX_ACL_VALID_WITH_NS
+
 /* iops->put_link() cookie */
 #undef HAVE_PUT_LINK_COOKIE
 
 /* REQ_FAILFAST_MASK is defined */
 #undef HAVE_REQ_FAILFAST_MASK
 
+/* REQ_OP_DISCARD is defined */
+#undef HAVE_REQ_OP_DISCARD
+
+/* REQ_OP_FLUSH is defined */
+#undef HAVE_REQ_OP_FLUSH
+
+/* REQ_OP_SECURE_ERASE is defined */
+#undef HAVE_REQ_OP_SECURE_DISCARD
+
 /* set_nlink() is available */
 #undef HAVE_SET_NLINK
 
 /* fops->iterate() is available */
 #undef HAVE_VFS_ITERATE
 
+/* fops->iterate_shared() is available */
+#undef HAVE_VFS_ITERATE_SHARED
+
 /* fops->readdir() is available */
 #undef HAVE_VFS_READDIR
 
 /* xattr_handler->get() wants dentry */
 #undef HAVE_XATTR_GET_DENTRY
 
+/* xattr_handler->get() wants both dentry and inode */
+#undef HAVE_XATTR_GET_DENTRY_INODE
+
 /* xattr_handler->get() wants xattr_handler */
 #undef HAVE_XATTR_GET_HANDLER
 
 /* xattr_handler->set() wants dentry */
 #undef HAVE_XATTR_SET_DENTRY
 
+/* xattr_handler->set() wants both dentry and inode */
+#undef HAVE_XATTR_SET_DENTRY_INODE
+
 /* xattr_handler->set() wants xattr_handler */
 #undef HAVE_XATTR_SET_HANDLER