[PATCH][ARTFUL] UBUNTU: SAUCE: (noup) Update spl to 0.6.5.10-1, zfs to 0.6.5.10-1ubuntu2

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH][ARTFUL] UBUNTU: SAUCE: (noup) Update spl to 0.6.5.10-1, zfs to 0.6.5.10-1ubuntu2

Colin Ian King-2
From: Colin Ian King <[hidden email]>

This has been fully tested against 4.11/4.12 with the kernel
team ZFS regression tests.

Signed-off-by: Colin Ian King <[hidden email]>
---
 spl/META                            |   4 +-
 spl/configure                       |  20 +-
 spl/dkms.conf                       |   2 +-
 spl/lib/list.c                      |  20 +-
 spl/module/spl/spl-vnode.c          |  15 ++
 spl/rpm/generic/spl-kmod.spec.in    |  14 ++
 spl/rpm/generic/spl.spec.in         |   9 +
 spl/rpm/redhat/spl-kmod.spec.in     |   5 +
 spl/rpm/redhat/spl.spec.in          |   9 +
 zfs/META                            |   4 +-
 zfs/config/kernel-bdi.m4            |   2 +-
 zfs/config/kernel-vfs-rw-iterate.m4 |  22 +-
 zfs/configure                       | 150 ++++++++++-
 zfs/dkms.conf                       |   2 +-
 zfs/include/linux/blkdev_compat.h   |  15 +-
 zfs/include/linux/vfs_compat.h      |   2 +-
 zfs/include/sys/zfs_context.h       |   1 -
 zfs/module/avl/zavl.mod.c           |  33 +++
 zfs/module/nvpair/znvpair.mod.c     |  44 ++++
 zfs/module/unicode/zunicode.mod.c   |  35 +++
 zfs/module/zcommon/zcommon.mod.c    |  54 ++++
 zfs/module/zfs/arc.c                |   7 +-
 zfs/module/zfs/dmu.c                |   9 +-
 zfs/module/zfs/spa.c                |   6 -
 zfs/module/zfs/vdev.c               |   3 +
 zfs/module/zfs/vdev_file.c          |   2 +-
 zfs/module/zfs/vdev_queue.c         |  12 +-
 zfs/module/zfs/zfs.mod.c            | 481 ++++++++++++++++++++++++++++++++++++
 zfs/module/zfs/zfs_ctldir.c         |   3 +
 zfs/module/zfs/zfs_vnops.c          |  29 ++-
 zfs/module/zfs/zio.c                |   4 +-
 zfs/module/zfs/zpl_ctldir.c         |   5 +-
 zfs/module/zfs/zpl_file.c           |   6 +
 zfs/module/zfs/zpl_inode.c          |   2 +-
 zfs/module/zpios/zpios.mod.c        |  85 +++++++
 zfs/zfs_config.h.in                 |   3 +
 36 files changed, 1042 insertions(+), 77 deletions(-)
 create mode 100644 zfs/module/avl/zavl.mod.c
 create mode 100644 zfs/module/nvpair/znvpair.mod.c
 create mode 100644 zfs/module/unicode/zunicode.mod.c
 create mode 100644 zfs/module/zcommon/zcommon.mod.c
 create mode 100644 zfs/module/zfs/zfs.mod.c
 create mode 100644 zfs/module/zpios/zpios.mod.c

diff --git a/spl/META b/spl/META
index 15bf2c386b27..cac39adb70d5 100644
--- a/spl/META
+++ b/spl/META
@@ -1,8 +1,8 @@
 Meta:         1
 Name:         spl
 Branch:       1.0
-Version:      0.6.5.9
-Release:      1ubuntu2
+Version:      0.6.5.10
+Release:      1
 Release-Tags: relext
 License:      GPL
 Author:       OpenZFS on Linux
diff --git a/spl/configure b/spl/configure
index 9f493590abed..152f618714be 100755
--- a/spl/configure
+++ b/spl/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for spl 0.6.5.9.
+# Generated by GNU Autoconf 2.69 for spl 0.6.5.10.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='spl'
 PACKAGE_TARNAME='spl'
-PACKAGE_VERSION='0.6.5.9'
-PACKAGE_STRING='spl 0.6.5.9'
+PACKAGE_VERSION='0.6.5.10'
+PACKAGE_STRING='spl 0.6.5.10'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1389,7 +1389,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 spl 0.6.5.9 to adapt to many kinds of systems.
+\`configure' configures spl 0.6.5.10 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1461,7 +1461,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of spl 0.6.5.9:";;
+     short | recursive ) echo "Configuration of spl 0.6.5.10:";;
    esac
   cat <<\_ACEOF
 
@@ -1586,7 +1586,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-spl configure 0.6.5.9
+spl configure 0.6.5.10
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1864,7 +1864,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 spl $as_me 0.6.5.9, which was
+It was created by spl $as_me 0.6.5.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2997,7 +2997,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='spl'
- VERSION='0.6.5.9'
+ VERSION='0.6.5.10'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -18924,7 +18924,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 spl $as_me 0.6.5.9, which was
+This file was extended by spl $as_me 0.6.5.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -18990,7 +18990,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="\\
-spl config.status 0.6.5.9
+spl config.status 0.6.5.10
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/spl/dkms.conf b/spl/dkms.conf
index 80058f2444b4..16c5267525f2 100644
--- a/spl/dkms.conf
+++ b/spl/dkms.conf
@@ -1,6 +1,6 @@
 AUTOINSTALL="yes"
 PACKAGE_NAME="spl"
-PACKAGE_VERSION="0.6.5.9"
+PACKAGE_VERSION="0.6.5.10"
 PRE_BUILD="configure
   --prefix=/usr
   --with-config=kernel
diff --git a/spl/lib/list.c b/spl/lib/list.c
index 55367e449485..140a1bbdd0d7 100644
--- a/spl/lib/list.c
+++ b/spl/lib/list.c
@@ -220,7 +220,9 @@ list_create (ListDelF f)
     l->fDel = f;
     l->count = 0;
     list_mutex_init(&l->mutex);
-    assert(l->magic = LIST_MAGIC);      /* set magic via assert abuse */
+#ifndef NDEBUG
+    l->magic = LIST_MAGIC;
+#endif
     return(l);
 }
 
@@ -238,7 +240,9 @@ list_destroy (List l)
     while (i) {
         assert(i->magic == LIST_MAGIC);
         iTmp = i->iNext;
-        assert(i->magic = ~LIST_MAGIC); /* clear magic via assert abuse */
+#ifndef NDEBUG
+        i->magic = ~LIST_MAGIC;
+#endif /* !NDEBUG */
         list_iterator_free(i);
         i = iTmp;
     }
@@ -250,7 +254,9 @@ list_destroy (List l)
         list_node_free(p);
         p = pTmp;
     }
-    assert(l->magic = ~LIST_MAGIC);     /* clear magic via assert abuse */
+#ifndef NDEBUG
+    l->magic = ~LIST_MAGIC;
+#endif /* !NDEBUG */
     list_mutex_unlock(&l->mutex);
     list_mutex_destroy(&l->mutex);
     list_free(l);
@@ -520,7 +526,9 @@ list_iterator_create (List l)
     i->prev = &l->head;
     i->iNext = l->iNext;
     l->iNext = i;
-    assert(i->magic = LIST_MAGIC);      /* set magic via assert abuse */
+#ifndef NDEBUG
+    i->magic = LIST_MAGIC;
+#endif /* !NDEBUG */
     list_mutex_unlock(&l->mutex);
     return(i);
 }
@@ -557,7 +565,9 @@ list_iterator_destroy (ListIterator i)
         }
     }
     list_mutex_unlock(&i->list->mutex);
-    assert(i->magic = ~LIST_MAGIC);     /* clear magic via assert abuse */
+#ifndef NDEBUG
+    i->magic = ~LIST_MAGIC;
+#endif /* !NDEBUG */
     list_iterator_free(i);
     return;
 }
diff --git a/spl/module/spl/spl-vnode.c b/spl/module/spl/spl-vnode.c
index 6ee147e0e7d8..e3188a1af8b0 100644
--- a/spl/module/spl/spl-vnode.c
+++ b/spl/module/spl/spl-vnode.c
@@ -578,6 +578,9 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag,
     offset_t offset, void *x6, void *x7)
 {
  int error = EOPNOTSUPP;
+#ifdef FALLOC_FL_PUNCH_HOLE
+ int fstrans;
+#endif
 
  if (cmd != F_FREESP || bfp->l_whence != 0)
  return (EOPNOTSUPP);
@@ -588,12 +591,24 @@ int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag,
 
 #ifdef FALLOC_FL_PUNCH_HOLE
  /*
+ * May enter XFS which generates a warning when PF_FSTRANS is set.
+ * To avoid this the flag is cleared over vfs_sync() and then reset.
+ */
+ fstrans = __spl_pf_fstrans_check();
+ if (fstrans)
+ current->flags &= ~(__SPL_PF_FSTRANS);
+
+ /*
  * When supported by the underlying file system preferentially
  * use the fallocate() callback to preallocate the space.
  */
  error = -spl_filp_fallocate(vp->v_file,
     FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,
     bfp->l_start, bfp->l_len);
+
+ if (fstrans)
+ current->flags |= __SPL_PF_FSTRANS;
+
  if (error == 0)
  return (0);
 #endif
diff --git a/spl/rpm/generic/spl-kmod.spec.in b/spl/rpm/generic/spl-kmod.spec.in
index eb2dc0468696..b4350784d235 100644
--- a/spl/rpm/generic/spl-kmod.spec.in
+++ b/spl/rpm/generic/spl-kmod.spec.in
@@ -53,6 +53,11 @@ BuildRequires:  %{_bindir}/kmodtool
 %endif
 %endif
 
+# LDFLAGS are not sanitized by arch/powerpc/Makefile (unlike other arches)
+%ifarch ppc ppc64 ppc64le
+%global __global_ldflags %{nil}
+%endif
+
 %if 0%{?fedora} >= 17
 %define prefix  /usr
 %endif
@@ -162,6 +167,15 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Mon Jun 12 2017 Tony Hutter <[hidden email]> - 0.6.5.10-1
+- Linux 4.12 compat: PF_FSTRANS was removed zfsonlinux/spl#614
+- Clear PF_FSTRANS over spl_filp_fallocate() zfsonlinux/splzfsonlinux/zfs#4529
+- glibc 2.25 compat: remove assert(X=Y) zfsonlinux/spl#610
+- Linux 4.11 compat: remove stub for __put_task_struct zfsonlinux/spl#608
+- Linux 4.11 compat: add linux/sched/signal.h zfsonlinux/spl#608
+- Linux 4.11 compat: vfs_getattr() takes 4 args zfsonlinux/spl#608
+- Fix powerpc build zfsonlinux/spl#607
+- Linux 4.11 compat: set_task_state() removed zfsonlinux/spl#603
 * Fri Feb 3 2017 Brian Behlendorf <[hidden email]> - 0.6.5.9-1
 - Use kernel slab for vn_cache and vn_file_cache zfsonlinux/spl#599
 - Fix splat-cred.c cred usage zfsonlinux/spl#556
diff --git a/spl/rpm/generic/spl.spec.in b/spl/rpm/generic/spl.spec.in
index f95519ca3b7e..7142e9e68165 100644
--- a/spl/rpm/generic/spl.spec.in
+++ b/spl/rpm/generic/spl.spec.in
@@ -33,6 +33,15 @@ make install DESTDIR=%{?buildroot}
 %{_mandir}/man5/*
 
 %changelog
+* Mon Jun 12 2017 Tony Hutter <[hidden email]> - 0.6.5.10-1
+- Linux 4.12 compat: PF_FSTRANS was removed zfsonlinux/spl#614
+- Clear PF_FSTRANS over spl_filp_fallocate() zfsonlinux/splzfsonlinux/zfs#4529
+- glibc 2.25 compat: remove assert(X=Y) zfsonlinux/spl#610
+- Linux 4.11 compat: remove stub for __put_task_struct zfsonlinux/spl#608
+- Linux 4.11 compat: add linux/sched/signal.h zfsonlinux/spl#608
+- Linux 4.11 compat: vfs_getattr() takes 4 args zfsonlinux/spl#608
+- Fix powerpc build zfsonlinux/spl#607
+- Linux 4.11 compat: set_task_state() removed zfsonlinux/spl#603
 * Fri Feb 3 2017 Brian Behlendorf <[hidden email]> - 0.6.5.9-1
 - Use kernel slab for vn_cache and vn_file_cache zfsonlinux/spl#599
 - Fix splat-cred.c cred usage zfsonlinux/spl#556
diff --git a/spl/rpm/redhat/spl-kmod.spec.in b/spl/rpm/redhat/spl-kmod.spec.in
index 6fcc4a898b55..cab72a7c78da 100644
--- a/spl/rpm/redhat/spl-kmod.spec.in
+++ b/spl/rpm/redhat/spl-kmod.spec.in
@@ -22,6 +22,11 @@ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires:       @PACKAGE@ = %{version}\n\
 Conflicts:      @PACKAGE@-dkms\n\n" > %{_sourcedir}/kmod-preamble)
 
+# LDFLAGS are not sanitized by arch/powerpc/Makefile (unlike other arches)
+%ifarch ppc ppc64 ppc64le
+%global __global_ldflags %{nil}
+%endif
+
 %description
 This package contains the kernel modules required to emulate
 several interfaces provided by the Solaris kernel.
diff --git a/spl/rpm/redhat/spl.spec.in b/spl/rpm/redhat/spl.spec.in
index f95519ca3b7e..7142e9e68165 100644
--- a/spl/rpm/redhat/spl.spec.in
+++ b/spl/rpm/redhat/spl.spec.in
@@ -33,6 +33,15 @@ make install DESTDIR=%{?buildroot}
 %{_mandir}/man5/*
 
 %changelog
+* Mon Jun 12 2017 Tony Hutter <[hidden email]> - 0.6.5.10-1
+- Linux 4.12 compat: PF_FSTRANS was removed zfsonlinux/spl#614
+- Clear PF_FSTRANS over spl_filp_fallocate() zfsonlinux/splzfsonlinux/zfs#4529
+- glibc 2.25 compat: remove assert(X=Y) zfsonlinux/spl#610
+- Linux 4.11 compat: remove stub for __put_task_struct zfsonlinux/spl#608
+- Linux 4.11 compat: add linux/sched/signal.h zfsonlinux/spl#608
+- Linux 4.11 compat: vfs_getattr() takes 4 args zfsonlinux/spl#608
+- Fix powerpc build zfsonlinux/spl#607
+- Linux 4.11 compat: set_task_state() removed zfsonlinux/spl#603
 * Fri Feb 3 2017 Brian Behlendorf <[hidden email]> - 0.6.5.9-1
 - Use kernel slab for vn_cache and vn_file_cache zfsonlinux/spl#599
 - Fix splat-cred.c cred usage zfsonlinux/spl#556
diff --git a/zfs/META b/zfs/META
index 496bf54d3281..31f2750261e2 100644
--- a/zfs/META
+++ b/zfs/META
@@ -1,8 +1,8 @@
 Meta:         1
 Name:         zfs
 Branch:       1.0
-Version:      0.6.5.9
-Release:      5ubuntu7
+Version:      0.6.5.10
+Release:      1ubuntu2~2
 Release-Tags: relext
 License:      CDDL
 Author:       OpenZFS on Linux
diff --git a/zfs/config/kernel-bdi.m4 b/zfs/config/kernel-bdi.m4
index 53945651f406..c2a9dd28bf4e 100644
--- a/zfs/config/kernel-bdi.m4
+++ b/zfs/config/kernel-bdi.m4
@@ -16,7 +16,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BDI], [
  ], [super_setup_bdi_name], [fs/super.c], [
  AC_MSG_RESULT(yes)
  AC_DEFINE(HAVE_SUPER_SETUP_BDI_NAME, 1,
-    [super_setup_bdi_name() exits])
+                    [super_setup_bdi_name() exits])
  ], [
  AC_MSG_RESULT(no)
  AC_MSG_CHECKING(
diff --git a/zfs/config/kernel-vfs-rw-iterate.m4 b/zfs/config/kernel-vfs-rw-iterate.m4
index af44beb7bcfc..9f8fe6559fa3 100644
--- a/zfs/config/kernel-vfs-rw-iterate.m4
+++ b/zfs/config/kernel-vfs-rw-iterate.m4
@@ -1,5 +1,5 @@
 dnl #
-dnl # Linux 4.1.x API
+dnl # Linux 3.16 API
 dnl #
 AC_DEFUN([ZFS_AC_KERNEL_VFS_RW_ITERATE],
  [AC_MSG_CHECKING([whether fops->read/write_iter() are available])
@@ -21,6 +21,26 @@ AC_DEFUN([ZFS_AC_KERNEL_VFS_RW_ITERATE],
  AC_MSG_RESULT(yes)
  AC_DEFINE(HAVE_VFS_RW_ITERATE, 1,
  [fops->read/write_iter() are available])
+
+ ZFS_AC_KERNEL_NEW_SYNC_READ
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
+
+dnl #
+dnl # Linux 4.1 API
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_NEW_SYNC_READ],
+ [AC_MSG_CHECKING([whether new_sync_read() is available])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ new_sync_read(NULL, NULL, 0, NULL);
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_NEW_SYNC_READ, 1,
+ [new_sync_read() is available])
  ],[
  AC_MSG_RESULT(no)
  ])
diff --git a/zfs/configure b/zfs/configure
index dcfbfd580ff3..f943a0fd95cb 100755
--- a/zfs/configure
+++ b/zfs/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for zfs 0.6.5.9.
+# Generated by GNU Autoconf 2.69 for zfs 0.6.5.10.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='zfs'
 PACKAGE_TARNAME='zfs'
-PACKAGE_VERSION='0.6.5.9'
-PACKAGE_STRING='zfs 0.6.5.9'
+PACKAGE_VERSION='0.6.5.10'
+PACKAGE_STRING='zfs 0.6.5.10'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1432,7 +1432,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.9 to adapt to many kinds of systems.
+\`configure' configures zfs 0.6.5.10 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1504,7 +1504,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of zfs 0.6.5.9:";;
+     short | recursive ) echo "Configuration of zfs 0.6.5.10:";;
    esac
   cat <<\_ACEOF
 
@@ -1647,7 +1647,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-zfs configure 0.6.5.9
+zfs configure 0.6.5.10
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2012,7 +2012,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.9, which was
+It was created by zfs $as_me 0.6.5.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3171,7 +3171,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='zfs'
- VERSION='0.6.5.9'
+ VERSION='0.6.5.10'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -24308,6 +24308,71 @@ $as_echo "yes" >&6; }
 $as_echo "#define HAVE_VFS_RW_ITERATE 1" >>confdefs.h
 
 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether new_sync_read() is available" >&5
+$as_echo_n "checking whether new_sync_read() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/fs.h>
+
+int
+main (void)
+{
+
+ new_sync_read(NULL, NULL, 0, NULL);
+
+  ;
+  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_NEW_SYNC_READ 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
+
+
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
@@ -35865,6 +35930,71 @@ $as_echo "yes" >&6; }
 $as_echo "#define HAVE_VFS_RW_ITERATE 1" >>confdefs.h
 
 
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether new_sync_read() is available" >&5
+$as_echo_n "checking whether new_sync_read() is available... " >&6; }
+
+
+cat confdefs.h - <<_ACEOF >conftest.c
+
+
+ #include <linux/fs.h>
+
+int
+main (void)
+{
+
+ new_sync_read(NULL, NULL, 0, NULL);
+
+  ;
+  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_NEW_SYNC_READ 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
+
+
+
+
 else
   $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
@@ -38038,7 +38168,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.9, which was
+This file was extended by zfs $as_me 0.6.5.10, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -38104,7 +38234,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.9
+zfs config.status 0.6.5.10
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/zfs/dkms.conf b/zfs/dkms.conf
index a0d084e6c0af..aa5d0ecbfa43 100644
--- a/zfs/dkms.conf
+++ b/zfs/dkms.conf
@@ -1,7 +1,7 @@
 BUILD_DEPENDS[0]="spl"
 AUTOINSTALL="yes"
 PACKAGE_NAME="zfs"
-PACKAGE_VERSION="0.6.5.9"
+PACKAGE_VERSION="0.6.5.10"
 PRE_BUILD="configure
   --prefix=/usr
   --with-config=kernel
diff --git a/zfs/include/linux/blkdev_compat.h b/zfs/include/linux/blkdev_compat.h
index 8179aca6b9f1..871506d7c924 100644
--- a/zfs/include/linux/blkdev_compat.h
+++ b/zfs/include/linux/blkdev_compat.h
@@ -341,12 +341,12 @@ bio_set_op_attrs(struct bio *bio, unsigned rw, unsigned flags)
 static inline void
 bio_set_flush(struct bio *bio)
 {
-#if defined(WRITE_BARRIER) /* < 2.6.37 */
- bio_set_op_attrs(bio, 0, WRITE_BARRIER);
+#if defined(REQ_PREFLUSH) /* >= 4.10 */
+ bio_set_op_attrs(bio, 0, REQ_PREFLUSH);
 #elif defined(WRITE_FLUSH_FUA) /* >= 2.6.37 and <= 4.9 */
  bio_set_op_attrs(bio, 0, WRITE_FLUSH_FUA);
-#elif defined(REQ_PREFLUSH) /* >= 4.10 */
- bio_set_op_attrs(bio, 0, REQ_PREFLUSH);
+#elif defined(WRITE_BARRIER) /* < 2.6.37 */
+ bio_set_op_attrs(bio, 0, WRITE_BARRIER);
 #else
 #error "Allowing the build will cause bio_set_flush requests to be ignored."
  "Please file an issue report at: "
@@ -373,9 +373,6 @@ bio_set_flush(struct bio *bio)
  * 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.
  *
- * Note that 2.6.32 era kernels provide both BIO_RW_BARRIER and REQ_FLUSH,
- * where BIO_RW_BARRIER is the correct interface.  Therefore, it is important
- * that the HAVE_BIO_RW_BARRIER check occur before the REQ_FLUSH check.
  */
 static inline boolean_t
 bio_is_flush(struct bio *bio)
@@ -386,10 +383,10 @@ bio_is_flush(struct bio *bio)
  return (bio->bi_opf & REQ_PREFLUSH);
 #elif defined(REQ_PREFLUSH) && !defined(HAVE_BIO_BI_OPF)
  return (bio->bi_rw & REQ_PREFLUSH);
-#elif defined(HAVE_BIO_RW_BARRIER)
- return (bio->bi_rw & (1 << BIO_RW_BARRIER));
 #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"
diff --git a/zfs/include/linux/vfs_compat.h b/zfs/include/linux/vfs_compat.h
index a859b7c649c8..a4432e0f051d 100644
--- a/zfs/include/linux/vfs_compat.h
+++ b/zfs/include/linux/vfs_compat.h
@@ -79,7 +79,7 @@ static inline int
 zpl_bdi_setup(struct super_block *sb, char *name)
 {
  return super_setup_bdi_name(sb, "%.28s-%ld", name,
- atomic_long_inc_return(&zfs_bdi_seq));
+    atomic_long_inc_return(&zfs_bdi_seq));
 }
 static inline void
 zpl_bdi_destroy(struct super_block *sb)
diff --git a/zfs/include/sys/zfs_context.h b/zfs/include/sys/zfs_context.h
index 4eba6283f160..4f7e3287f3da 100644
--- a/zfs/include/sys/zfs_context.h
+++ b/zfs/include/sys/zfs_context.h
@@ -748,7 +748,6 @@ typedef int fstrans_cookie_t;
 extern fstrans_cookie_t spl_fstrans_mark(void);
 extern void spl_fstrans_unmark(fstrans_cookie_t);
 extern int spl_fstrans_check(void);
-extern int __spl_pf_fstrans_check(void);
 
 #endif /* _KERNEL */
 #endif /* _SYS_ZFS_CONTEXT_H */
diff --git a/zfs/module/avl/zavl.mod.c b/zfs/module/avl/zavl.mod.c
new file mode 100644
index 000000000000..0b0d55337d06
--- /dev/null
+++ b/zfs/module/avl/zavl.mod.c
@@ -0,0 +1,33 @@
+#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"))) = {
+ { 0x28950ef1, __VMLINUX_SYMBOL_STR(module_layout) },
+ { 0x7c1372e8, __VMLINUX_SYMBOL_STR(panic) },
+ { 0xf0fdf6cb, __VMLINUX_SYMBOL_STR(__stack_chk_fail) },
+ { 0xbdfb6dbb, __VMLINUX_SYMBOL_STR(__fentry__) },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=";
+
+
+MODULE_INFO(srcversion, "5F35BA9428E63D7D177201A");
+MODULE_INFO(rhelversion, "7.3");
diff --git a/zfs/module/nvpair/znvpair.mod.c b/zfs/module/nvpair/znvpair.mod.c
new file mode 100644
index 000000000000..6dfebde01dc5
--- /dev/null
+++ b/zfs/module/nvpair/znvpair.mod.c
@@ -0,0 +1,44 @@
+#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"))) = {
+ { 0x28950ef1, __VMLINUX_SYMBOL_STR(module_layout) },
+ { 0x349cba85, __VMLINUX_SYMBOL_STR(strchr) },
+ { 0x754d539c, __VMLINUX_SYMBOL_STR(strlen) },
+ { 0xb342d16a, __VMLINUX_SYMBOL_STR(spl_kmem_alloc) },
+ { 0xbc32eee7, __VMLINUX_SYMBOL_STR(spl_panic) },
+ { 0xe2d5255a, __VMLINUX_SYMBOL_STR(strcmp) },
+ { 0xfb578fc5, __VMLINUX_SYMBOL_STR(memset) },
+ { 0x5a921311, __VMLINUX_SYMBOL_STR(strncmp) },
+ { 0xf0fdf6cb, __VMLINUX_SYMBOL_STR(__stack_chk_fail) },
+ { 0xfe172afe, __VMLINUX_SYMBOL_STR(spl_vmem_alloc) },
+ { 0xbdfb6dbb, __VMLINUX_SYMBOL_STR(__fentry__) },
+ { 0x82fe53e1, __VMLINUX_SYMBOL_STR(ddi_strtol) },
+ { 0xddd4a3d3, __VMLINUX_SYMBOL_STR(xdrmem_create) },
+ { 0xb0e602eb, __VMLINUX_SYMBOL_STR(memmove) },
+ { 0x6d16801a, __VMLINUX_SYMBOL_STR(spl_kmem_free) },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=spl";
+
+
+MODULE_INFO(srcversion, "539CDAEA0E30550B4284AAA");
+MODULE_INFO(rhelversion, "7.3");
diff --git a/zfs/module/unicode/zunicode.mod.c b/zfs/module/unicode/zunicode.mod.c
new file mode 100644
index 000000000000..33472ee3df27
--- /dev/null
+++ b/zfs/module/unicode/zunicode.mod.c
@@ -0,0 +1,35 @@
+#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"))) = {
+ { 0x28950ef1, __VMLINUX_SYMBOL_STR(module_layout) },
+ { 0x754d539c, __VMLINUX_SYMBOL_STR(strlen) },
+ { 0xe2d5255a, __VMLINUX_SYMBOL_STR(strcmp) },
+ { 0x5a921311, __VMLINUX_SYMBOL_STR(strncmp) },
+ { 0xf0fdf6cb, __VMLINUX_SYMBOL_STR(__stack_chk_fail) },
+ { 0xbdfb6dbb, __VMLINUX_SYMBOL_STR(__fentry__) },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=";
+
+
+MODULE_INFO(srcversion, "5DC8CE3A830A36341CDAF7F");
+MODULE_INFO(rhelversion, "7.3");
diff --git a/zfs/module/zcommon/zcommon.mod.c b/zfs/module/zcommon/zcommon.mod.c
new file mode 100644
index 000000000000..4875cfb95b48
--- /dev/null
+++ b/zfs/module/zcommon/zcommon.mod.c
@@ -0,0 +1,54 @@
+#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"))) = {
+ { 0x28950ef1, __VMLINUX_SYMBOL_STR(module_layout) },
+ { 0x4c4fef19, __VMLINUX_SYMBOL_STR(kernel_stack) },
+ { 0x754d539c, __VMLINUX_SYMBOL_STR(strlen) },
+ { 0xb342d16a, __VMLINUX_SYMBOL_STR(spl_kmem_alloc) },
+ { 0x167e7f9d, __VMLINUX_SYMBOL_STR(__get_user_1) },
+ { 0xe2d5255a, __VMLINUX_SYMBOL_STR(strcmp) },
+ { 0x71de9b3f, __VMLINUX_SYMBOL_STR(_copy_to_user) },
+ { 0xee8843fa, __VMLINUX_SYMBOL_STR(nvpair_value_uint64) },
+ { 0x11089ac7, __VMLINUX_SYMBOL_STR(_ctype) },
+ { 0x5a921311, __VMLINUX_SYMBOL_STR(strncmp) },
+ { 0xe3a53f4c, __VMLINUX_SYMBOL_STR(sort) },
+ { 0xd42a96fa, __VMLINUX_SYMBOL_STR(nvpair_name) },
+ { 0x1bfac311, __VMLINUX_SYMBOL_STR(nvlist_lookup_nvlist) },
+ { 0x5d6e0bba, __VMLINUX_SYMBOL_STR(nvlist_lookup_uint64) },
+ { 0xf0fdf6cb, __VMLINUX_SYMBOL_STR(__stack_chk_fail) },
+ { 0xd0920999, __VMLINUX_SYMBOL_STR(nvpair_value_uint32) },
+ { 0xbdfb6dbb, __VMLINUX_SYMBOL_STR(__fentry__) },
+ { 0x29c88b11, __VMLINUX_SYMBOL_STR(nvlist_next_nvpair) },
+ { 0x82027a4c, __VMLINUX_SYMBOL_STR(cmn_err) },
+ { 0x28318305, __VMLINUX_SYMBOL_STR(snprintf) },
+ { 0xec1cce40, __VMLINUX_SYMBOL_STR(nvlist_lookup_nvlist_array) },
+ { 0xb0e602eb, __VMLINUX_SYMBOL_STR(memmove) },
+ { 0x6d16801a, __VMLINUX_SYMBOL_STR(spl_kmem_free) },
+ { 0x77e2f33, __VMLINUX_SYMBOL_STR(_copy_from_user) },
+ { 0xa66a6969, __VMLINUX_SYMBOL_STR(nvpair_value_nvlist) },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=spl,znvpair";
+
+
+MODULE_INFO(srcversion, "D94B05FC2B3769899B59647");
+MODULE_INFO(rhelversion, "7.3");
diff --git a/zfs/module/zfs/arc.c b/zfs/module/zfs/arc.c
index 04fde6c16789..c72ced758563 100644
--- a/zfs/module/zfs/arc.c
+++ b/zfs/module/zfs/arc.c
@@ -5475,11 +5475,12 @@ arc_init(void)
  * If it has been set by a module parameter, take that.
  * Otherwise, use a percentage of physical memory defined by
  * zfs_dirty_data_max_percent (default 10%) with a cap at
- * zfs_dirty_data_max_max (default 25% of physical memory).
+ * zfs_dirty_data_max_max (default 4G or 25% of physical memory).
  */
  if (zfs_dirty_data_max_max == 0)
- zfs_dirty_data_max_max = (uint64_t)physmem * PAGESIZE *
-    zfs_dirty_data_max_max_percent / 100;
+ zfs_dirty_data_max_max = MIN(4ULL * 1024 * 1024 * 1024,
+    (uint64_t)physmem * PAGESIZE *
+    zfs_dirty_data_max_max_percent / 100);
 
  if (zfs_dirty_data_max == 0) {
  zfs_dirty_data_max = (uint64_t)physmem * PAGESIZE *
diff --git a/zfs/module/zfs/dmu.c b/zfs/module/zfs/dmu.c
index 5e2a1db601b4..9baeb01fd1dc 100644
--- a/zfs/module/zfs/dmu.c
+++ b/zfs/module/zfs/dmu.c
@@ -49,6 +49,7 @@
 #ifdef _KERNEL
 #include <sys/vmsystm.h>
 #include <sys/zfs_znode.h>
+#include <linux/kmap_compat.h>
 #endif
 
 /*
@@ -1056,6 +1057,7 @@ dmu_bio_copy(void *arg_buf, int size, struct bio *bio, size_t bio_offset)
  char *bv_buf;
  int tocpy, bv_len, bv_offset;
  int offset = 0;
+ void *paddr;
 
  bio_for_each_segment4(bv, bvp, bio, iter) {
 
@@ -1080,14 +1082,15 @@ dmu_bio_copy(void *arg_buf, int size, struct bio *bio, size_t bio_offset)
  tocpy = MIN(bv_len, size - offset);
  ASSERT3S(tocpy, >=, 0);
 
- bv_buf = page_address(bvp->bv_page) + bv_offset;
- ASSERT3P(bv_buf, !=, NULL);
+ paddr = zfs_kmap_atomic(bvp->bv_page, KM_USER0);
+ bv_buf = paddr + bv_offset;
+ ASSERT3P(paddr, !=, NULL);
 
  if (bio_data_dir(bio) == WRITE)
  memcpy(arg_buf + offset, bv_buf, tocpy);
  else
  memcpy(bv_buf, arg_buf + offset, tocpy);
-
+ zfs_kunmap_atomic(paddr, KM_USER0);
  offset += tocpy;
  }
 out:
diff --git a/zfs/module/zfs/spa.c b/zfs/module/zfs/spa.c
index dde909eaec95..a6bc4e5912bf 100644
--- a/zfs/module/zfs/spa.c
+++ b/zfs/module/zfs/spa.c
@@ -3962,12 +3962,6 @@ spa_import(char *pool, nvlist_t *config, nvlist_t *props, uint64_t flags)
 
  VERIFY(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
     &nvroot) == 0);
- if (error == 0)
- error = spa_validate_aux(spa, nvroot, -1ULL,
-    VDEV_ALLOC_SPARE);
- if (error == 0)
- error = spa_validate_aux(spa, nvroot, -1ULL,
-    VDEV_ALLOC_L2CACHE);
  spa_config_exit(spa, SCL_ALL, FTAG);
 
  if (props != NULL)
diff --git a/zfs/module/zfs/vdev.c b/zfs/module/zfs/vdev.c
index 7d814a63b41f..8095b6177b27 100644
--- a/zfs/module/zfs/vdev.c
+++ b/zfs/module/zfs/vdev.c
@@ -1799,6 +1799,9 @@ vdev_dtl_should_excise(vdev_t *vd)
  ASSERT0(scn->scn_phys.scn_errors);
  ASSERT0(vd->vdev_children);
 
+ if (vd->vdev_state < VDEV_STATE_DEGRADED)
+ return (B_FALSE);
+
  if (vd->vdev_resilver_txg == 0 ||
     range_tree_space(vd->vdev_dtl[DTL_MISSING]) == 0)
  return (B_TRUE);
diff --git a/zfs/module/zfs/vdev_file.c b/zfs/module/zfs/vdev_file.c
index 3e31718e860b..a29ea7bf9515 100644
--- a/zfs/module/zfs/vdev_file.c
+++ b/zfs/module/zfs/vdev_file.c
@@ -200,7 +200,7 @@ vdev_file_io_start(zio_t *zio)
  * already set, see xfs_vm_writepage().  Therefore
  * the sync must be dispatched to a different context.
  */
- if (__spl_pf_fstrans_check()) {
+ if (spl_fstrans_check()) {
  VERIFY3U(taskq_dispatch(system_taskq,
     vdev_file_io_fsync, zio, TQ_SLEEP), !=, 0);
  return;
diff --git a/zfs/module/zfs/vdev_queue.c b/zfs/module/zfs/vdev_queue.c
index 4ed62f96328c..c4e80d517f94 100644
--- a/zfs/module/zfs/vdev_queue.c
+++ b/zfs/module/zfs/vdev_queue.c
@@ -24,7 +24,7 @@
  */
 
 /*
- * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2017 by Delphix. All rights reserved.
  */
 
 #include <sys/zfs_context.h>
@@ -545,7 +545,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio)
 
  /*
  * Walk backwards through sufficiently contiguous I/Os
- * recording the last non-option I/O.
+ * recording the last non-optional I/O.
  */
  while ((dio = AVL_PREV(t, first)) != NULL &&
     (dio->io_flags & ZIO_FLAG_AGG_INHERIT) == flags &&
@@ -567,10 +567,14 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio)
 
  /*
  * Walk forward through sufficiently contiguous I/Os.
+ * The aggregation limit does not apply to optional i/os, so that
+ * we can issue contiguous writes even if they are larger than the
+ * aggregation limit.
  */
  while ((dio = AVL_NEXT(t, last)) != NULL &&
     (dio->io_flags & ZIO_FLAG_AGG_INHERIT) == flags &&
-    IO_SPAN(first, dio) <= zfs_vdev_aggregation_limit &&
+    (IO_SPAN(first, dio) <= zfs_vdev_aggregation_limit ||
+    (dio->io_flags & ZIO_FLAG_OPTIONAL)) &&
     IO_GAP(last, dio) <= maxgap) {
  last = dio;
  if (!(last->io_flags & ZIO_FLAG_OPTIONAL))
@@ -605,6 +609,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio)
  dio = AVL_NEXT(t, last);
  dio->io_flags &= ~ZIO_FLAG_OPTIONAL;
  } else {
+ /* do not include the optional i/o */
  while (last != mandatory && last != first) {
  ASSERT(last->io_flags & ZIO_FLAG_OPTIONAL);
  last = AVL_PREV(t, last);
@@ -616,7 +621,6 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio)
  return (NULL);
 
  size = IO_SPAN(first, last);
- ASSERT3U(size, <=, zfs_vdev_aggregation_limit);
 
  buf = zio_buf_alloc_flags(size, KM_NOSLEEP);
  if (buf == NULL)
diff --git a/zfs/module/zfs/zfs.mod.c b/zfs/module/zfs/zfs.mod.c
new file mode 100644
index 000000000000..f6bca8dd161c
--- /dev/null
+++ b/zfs/module/zfs/zfs.mod.c
@@ -0,0 +1,481 @@
+#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"))) = {
+ { 0x28950ef1, __VMLINUX_SYMBOL_STR(module_layout) },
+ { 0x5f953dda, __VMLINUX_SYMBOL_STR(vn_fsync) },
+ { 0xc93c34da, __VMLINUX_SYMBOL_STR(d_path) },
+ { 0x13be9977, __VMLINUX_SYMBOL_STR(nvlist_add_boolean_array) },
+ { 0x9a1dfd65, __VMLINUX_SYMBOL_STR(strpbrk) },
+ { 0xb7d1325e, __VMLINUX_SYMBOL_STR(nvlist_add_int32) },
+ { 0x30877173, __VMLINUX_SYMBOL_STR(fs_bio_set) },
+ { 0x6cc650a4, __VMLINUX_SYMBOL_STR(zfs_prop_get_type) },
+ { 0xe8e6892e, __VMLINUX_SYMBOL_STR(__kstat_install) },
+ { 0x1c90ea0e, __VMLINUX_SYMBOL_STR(nvlist_add_int64) },
+ { 0x36198a4d, __VMLINUX_SYMBOL_STR(nvpair_value_string) },
+ { 0xf9a482f9, __VMLINUX_SYMBOL_STR(msleep) },
+ { 0xd8b5eb52, __VMLINUX_SYMBOL_STR(z_uncompress) },
+ { 0x7959fc3f, __VMLINUX_SYMBOL_STR(alloc_disk) },
+ { 0xfe6fd8db, __VMLINUX_SYMBOL_STR(generic_getxattr) },
+ { 0x8b484c4c, __VMLINUX_SYMBOL_STR(fnvlist_lookup_nvpair) },
+ { 0xcf47e212, __VMLINUX_SYMBOL_STR(fnvlist_add_int32) },
+ { 0xf5893abf, __VMLINUX_SYMBOL_STR(up_read) },
+ { 0x61762346, __VMLINUX_SYMBOL_STR(blk_cleanup_queue) },
+ { 0xaada9d55, __VMLINUX_SYMBOL_STR(zfs_prop_init) },
+ { 0x4c4fef19, __VMLINUX_SYMBOL_STR(kernel_stack) },
+ { 0xb41ea00a, __VMLINUX_SYMBOL_STR(nvlist_add_uint8_array) },
+ { 0xea1f9d8a, __VMLINUX_SYMBOL_STR(blk_queue_io_opt) },
+ { 0x4be94236, __VMLINUX_SYMBOL_STR(rwsem_tryupgrade) },
+ { 0xeb862489, __VMLINUX_SYMBOL_STR(bio_alloc_bioset) },
+ { 0xdc89486b, __VMLINUX_SYMBOL_STR(zfs_name_to_prop) },
+ { 0xda3e43d1, __VMLINUX_SYMBOL_STR(_raw_spin_unlock) },
+ { 0xc821665c, __VMLINUX_SYMBOL_STR(generic_file_llseek) },
+ { 0x69c74a2b, __VMLINUX_SYMBOL_STR(__mark_inode_dirty) },
+ { 0x4b039d7, __VMLINUX_SYMBOL_STR(u8_validate) },
+ { 0x9d5b74e2, __VMLINUX_SYMBOL_STR(d_invalidate) },
+ { 0xb45a14de, __VMLINUX_SYMBOL_STR(__set_page_dirty_nobuffers) },
+ { 0xf2f1ef64, __VMLINUX_SYMBOL_STR(fnvlist_alloc) },
+ { 0x349cba85, __VMLINUX_SYMBOL_STR(strchr) },
+ { 0x9191a98c, __VMLINUX_SYMBOL_STR(nvlist_add_uint32_array) },
+ { 0x150ddbd2, __VMLINUX_SYMBOL_STR(kstat_runq_enter) },
+ { 0xb0704417, __VMLINUX_SYMBOL_STR(__remove_inode_hash) },
+ { 0xf351e0c7, __VMLINUX_SYMBOL_STR(get_gendisk) },
+ { 0x542de561, __VMLINUX_SYMBOL_STR(generic_write_checks) },
+ { 0x15692c87, __VMLINUX_SYMBOL_STR(param_ops_int) },
+ { 0x1403a15e, __VMLINUX_SYMBOL_STR(taskq_member) },
+ { 0xb0364551, __VMLINUX_SYMBOL_STR(zio_arena) },
+ { 0xf5dea0d6, __VMLINUX_SYMBOL_STR(nvpair_value_int64_array) },
+ { 0x188a3dfb, __VMLINUX_SYMBOL_STR(timespec_trunc) },
+ { 0x754d539c, __VMLINUX_SYMBOL_STR(strlen) },
+ { 0xd0ee38b8, __VMLINUX_SYMBOL_STR(schedule_timeout_uninterruptible) },
+ { 0xbd6bcd08, __VMLINUX_SYMBOL_STR(crhold) },
+ { 0x3a9b6fb9, __VMLINUX_SYMBOL_STR(blk_unregister_region) },
+ { 0x2f060b2b, __VMLINUX_SYMBOL_STR(d_set_d_op) },
+ { 0x5ef68d5c, __VMLINUX_SYMBOL_STR(blk_queue_max_hw_sectors) },
+ { 0x43bdcb52, __VMLINUX_SYMBOL_STR(vn_close) },
+ { 0x945b8886, __VMLINUX_SYMBOL_STR(filemap_write_and_wait_range) },
+ { 0x16916efb, __VMLINUX_SYMBOL_STR(nvlist_prev_nvpair) },
+ { 0x19295e53, __VMLINUX_SYMBOL_STR(taskq_create) },
+ { 0x1ba29031, __VMLINUX_SYMBOL_STR(zfs_component_namecheck) },
+ { 0xd0dbb495, __VMLINUX_SYMBOL_STR(elevator_change) },
+ { 0x2e99f239, __VMLINUX_SYMBOL_STR(kill_anon_super) },
+ { 0xce6d7d76, __VMLINUX_SYMBOL_STR(crgetruid) },
+ { 0x6a4152d5, __VMLINUX_SYMBOL_STR(nvlist_add_uint64) },
+ { 0x4672a9d9, __VMLINUX_SYMBOL_STR(fnvlist_pack_free) },
+ { 0xfe2b82d6, __VMLINUX_SYMBOL_STR(posix_acl_to_xattr) },
+ { 0x3127541f, __VMLINUX_SYMBOL_STR(vn_getattr) },
+ { 0x424ac2e1, __VMLINUX_SYMBOL_STR(nvlist_pack) },
+ { 0x930484aa, __VMLINUX_SYMBOL_STR(cpu_online_mask) },
+ { 0x79aa04a2, __VMLINUX_SYMBOL_STR(get_random_bytes) },
+ { 0x34184afe, __VMLINUX_SYMBOL_STR(current_kernel_time) },
+ { 0x1d5e717f, __VMLINUX_SYMBOL_STR(avl_nearest) },
+ { 0xb342d16a, __VMLINUX_SYMBOL_STR(spl_kmem_alloc) },
+ { 0x5d16cdc5, __VMLINUX_SYMBOL_STR(nvlist_exists) },
+ { 0x50612798, __VMLINUX_SYMBOL_STR(seq_puts) },
+ { 0x4cd6ab5c, __VMLINUX_SYMBOL_STR(rootdir) },
+ { 0x7926f6fe, __VMLINUX_SYMBOL_STR(vn_seek) },
+ { 0x73a78bc4, __VMLINUX_SYMBOL_STR(downgrade_write) },
+ { 0xf000f338, __VMLINUX_SYMBOL_STR(truncate_inode_pages_range) },
+ { 0x2ee05603, __VMLINUX_SYMBOL_STR(generic_file_open) },
+ { 0xacf4d843, __VMLINUX_SYMBOL_STR(match_strdup) },
+ { 0xffff91e3, __VMLINUX_SYMBOL_STR(taskq_init_ent) },
+ { 0xac2fe90b, __VMLINUX_SYMBOL_STR(kobj_close_file) },
+ { 0xcf24ceff, __VMLINUX_SYMBOL_STR(nvlist_remove) },
+ { 0xd488791e, __VMLINUX_SYMBOL_STR(__lock_page) },
+ { 0xb54533f7, __VMLINUX_SYMBOL_STR(usecs_to_jiffies) },
+ { 0x581b3ff3, __VMLINUX_SYMBOL_STR(zpool_prop_get_type) },
+ { 0xcde0e455, __VMLINUX_SYMBOL_STR(touch_atime) },
+ { 0xa483a8c3, __VMLINUX_SYMBOL_STR(zfs_prop_to_name) },
+ { 0xbaeceadd, __VMLINUX_SYMBOL_STR(crgetngroups) },
+ { 0x9ec5b8c6, __VMLINUX_SYMBOL_STR(kobj_get_filesize) },
+ { 0xd6f70ea0, __VMLINUX_SYMBOL_STR(nvlist_empty) },
+ { 0x187c0510, __VMLINUX_SYMBOL_STR(nvpair_value_int64) },
+ { 0x74df1d4, __VMLINUX_SYMBOL_STR(seq_printf) },
+ { 0xac095684, __VMLINUX_SYMBOL_STR(zfs_prop_inheritable) },
+ { 0xb6c2717d, __VMLINUX_SYMBOL_STR(fnvlist_lookup_uint64) },
+ { 0x44e9a829, __VMLINUX_SYMBOL_STR(match_token) },
+ { 0x769f7eae, __VMLINUX_SYMBOL_STR(avl_last) },
+ { 0xf4e84391, __VMLINUX_SYMBOL_STR(nvlist_add_nvlist) },
+ { 0xb205e7ee, __VMLINUX_SYMBOL_STR(nvpair_value_uint16_array) },
+ { 0x3098be9f, __VMLINUX_SYMBOL_STR(crgetgroups) },
+ { 0x67a76eae, __VMLINUX_SYMBOL_STR(avl_insert_here) },
+ { 0xf3e29ae0, __VMLINUX_SYMBOL_STR(zpool_prop_to_name) },
+ { 0x64913468, __VMLINUX_SYMBOL_STR(nvpair_value_uint8_array) },
+ { 0x4ed12f73, __VMLINUX_SYMBOL_STR(mutex_unlock) },
+ { 0x407478e1, __VMLINUX_SYMBOL_STR(nvpair_value_uint32_array) },
+ { 0x85df9b6c, __VMLINUX_SYMBOL_STR(strsep) },
+ { 0xccc94e8, __VMLINUX_SYMBOL_STR(nvlist_lookup_string) },
+ { 0x80f6aed7, __VMLINUX_SYMBOL_STR(vn_rdwr) },
+ { 0xb05ef89e, __VMLINUX_SYMBOL_STR(fnvlist_add_uint64) },
+ { 0x7f9ad7a0, __VMLINUX_SYMBOL_STR(generic_read_dir) },
+ { 0x1083f24f, __VMLINUX_SYMBOL_STR(zfs_prop_valid_for_type) },
+ { 0x5be9e34a, __VMLINUX_SYMBOL_STR(zfs_prop_setonce) },
+ { 0xde4fab67, __VMLINUX_SYMBOL_STR(igrab) },
+ { 0x5339da44, __VMLINUX_SYMBOL_STR(fnvlist_size) },
+ { 0x58b765b9, __VMLINUX_SYMBOL_STR(pool_namecheck) },
+ { 0x54efb5d6, __VMLINUX_SYMBOL_STR(cpu_number) },
+ { 0x61abde57, __VMLINUX_SYMBOL_STR(generic_setxattr) },
+ { 0x1ac5d3cb, __VMLINUX_SYMBOL_STR(strcspn) },
+ { 0x258b1c5, __VMLINUX_SYMBOL_STR(mount_nodev) },
+ { 0x4a6518b3, __VMLINUX_SYMBOL_STR(path_get) },
+ { 0xe7bbb60, __VMLINUX_SYMBOL_STR(redirty_page_for_writepage) },
+ { 0x91715312, __VMLINUX_SYMBOL_STR(sprintf) },
+ { 0x8eb0a41f, __VMLINUX_SYMBOL_STR(tsd_destroy) },
+ { 0x8d6ba8ae, __VMLINUX_SYMBOL_STR(spl_kmem_cache_free) },
+ { 0xbc32eee7, __VMLINUX_SYMBOL_STR(spl_panic) },
+ { 0x6bfc3d0, __VMLINUX_SYMBOL_STR(nv_alloc_init) },
+ { 0x50ea1952, __VMLINUX_SYMBOL_STR(nvlist_add_int16_array) },
+ { 0x7d11c268, __VMLINUX_SYMBOL_STR(jiffies) },
+ { 0x343a1a8, __VMLINUX_SYMBOL_STR(__list_add) },
+ { 0xc9468df0, __VMLINUX_SYMBOL_STR(lookup_bdev) },
+ { 0x2f4c181a, __VMLINUX_SYMBOL_STR(truncate_setsize) },
+ { 0xe196a9f7, __VMLINUX_SYMBOL_STR(mutex_trylock) },
+ { 0x57a6ccd0, __VMLINUX_SYMBOL_STR(down_read) },
+ { 0xe2d5255a, __VMLINUX_SYMBOL_STR(strcmp) },
+ { 0x35225ea3, __VMLINUX_SYMBOL_STR(down_write_trylock) },
+ { 0xdbe86ff6, __VMLINUX_SYMBOL_STR(end_page_writeback) },
+ { 0x7212fe43, __VMLINUX_SYMBOL_STR(cv_timedwait_hires) },
+ { 0xde9360ba, __VMLINUX_SYMBOL_STR(totalram_pages) },
+ { 0xaa65a555, __VMLINUX_SYMBOL_STR(kmem_asprintf) },
+ { 0x42585bc5, __VMLINUX_SYMBOL_STR(nvlist_add_string_array) },
+ { 0xff9d066b, __VMLINUX_SYMBOL_STR(u8_strcmp) },
+ { 0xe04a0100, __VMLINUX_SYMBOL_STR(nvlist_xalloc) },
+ { 0xcfb24408, __VMLINUX_SYMBOL_STR(nvpair_value_int32) },
+ { 0x72cf8c8b, __VMLINUX_SYMBOL_STR(crgetuid) },
+ { 0x7bae04db, __VMLINUX_SYMBOL_STR(uio_prefaultpages) },
+ { 0xba3e2d71, __VMLINUX_SYMBOL_STR(zone_get_hostid) },
+ { 0x7655f61b, __VMLINUX_SYMBOL_STR(invalidate_bdev) },
+ { 0x71de9b3f, __VMLINUX_SYMBOL_STR(_copy_to_user) },
+ { 0xa3908d18, __VMLINUX_SYMBOL_STR(avl_remove) },
+ { 0x528f1f4e, __VMLINUX_SYMBOL_STR(nvpair_value_int8_array) },
+ { 0xfe7c4287, __VMLINUX_SYMBOL_STR(nr_cpu_ids) },
+ { 0xe24d3a97, __VMLINUX_SYMBOL_STR(jiffies_64) },
+ { 0xee8843fa, __VMLINUX_SYMBOL_STR(nvpair_value_uint64) },
+ { 0xbe0a2f77, __VMLINUX_SYMBOL_STR(blk_queue_max_segments) },
+ { 0x106b6ba8, __VMLINUX_SYMBOL_STR(taskq_destroy) },
+ { 0x35b6b772, __VMLINUX_SYMBOL_STR(param_ops_charp) },
+ { 0xf9c0b663, __VMLINUX_SYMBOL_STR(strlcat) },
+ { 0xadac4d0f, __VMLINUX_SYMBOL_STR(inode_owner_or_capable) },
+ { 0xf23b2e74, __VMLINUX_SYMBOL_STR(misc_register) },
+ { 0x7023fd74, __VMLINUX_SYMBOL_STR(zfs_spa_version_map) },
+ { 0x66cb0ee2, __VMLINUX_SYMBOL_STR(nvpair_value_uint64_array) },
+ { 0x6e2e7d3f, __VMLINUX_SYMBOL_STR(kern_path) },
+ { 0xfb578fc5, __VMLINUX_SYMBOL_STR(memset) },
+ { 0xd4b1c70b, __VMLINUX_SYMBOL_STR(spl_kmem_cache_destroy) },
+ { 0xbd256438, __VMLINUX_SYMBOL_STR(nvlist_lookup_nvpair) },
+ { 0x29eec2f0, __VMLINUX_SYMBOL_STR(vmem_size) },
+ { 0xbc9dddde, __VMLINUX_SYMBOL_STR(taskq_wait_id) },
+ { 0x40e3ae7c, __VMLINUX_SYMBOL_STR(vn_getf) },
+ { 0x516b8b85, __VMLINUX_SYMBOL_STR(nvlist_add_int8_array) },
+ { 0x48f1f53d, __VMLINUX_SYMBOL_STR(d_add_ci) },
+ { 0xc810362f, __VMLINUX_SYMBOL_STR(strdup) },
+ { 0xddc65021, __VMLINUX_SYMBOL_STR(blk_alloc_queue) },
+ { 0x374a38c8, __VMLINUX_SYMBOL_STR(fnvlist_num_pairs) },
+ { 0x22c35c6c, __VMLINUX_SYMBOL_STR(fnvpair_value_nvlist) },
+ { 0x87a6cadd, __VMLINUX_SYMBOL_STR(avl_destroy) },
+ { 0x11089ac7, __VMLINUX_SYMBOL_STR(_ctype) },
+ { 0xd9977d8, __VMLINUX_SYMBOL_STR(fletcher_4_incremental_native) },
+ { 0x8f64aa4, __VMLINUX_SYMBOL_STR(_raw_spin_unlock_irqrestore) },
+ { 0xb8c7ff88, __VMLINUX_SYMBOL_STR(current_task) },
+ { 0xb26e179a, __VMLINUX_SYMBOL_STR(__cv_signal) },
+ { 0xcca5ec02, __VMLINUX_SYMBOL_STR(avl_numnodes) },
+ { 0x6127b911, __VMLINUX_SYMBOL_STR(kstat_waitq_exit) },
+ { 0xb327d49, __VMLINUX_SYMBOL_STR(check_disk_change) },
+ { 0x9a025cd5, __VMLINUX_SYMBOL_STR(__mutex_init) },
+ { 0x27e1a049, __VMLINUX_SYMBOL_STR(printk) },
+ { 0x8e864a86, __VMLINUX_SYMBOL_STR(posix_acl_chmod) },
+ { 0x30da4fbf, __VMLINUX_SYMBOL_STR(fnvlist_free) },
+ { 0x737e0781, __VMLINUX_SYMBOL_STR(find_lock_page) },
+ { 0xdba1e8a4, __VMLINUX_SYMBOL_STR(d_obtain_alias) },
+ { 0x449ad0a7, __VMLINUX_SYMBOL_STR(memcmp) },
+ { 0xbd275110, __VMLINUX_SYMBOL_STR(blk_queue_max_discard_sectors) },
+ { 0x95f82b97, __VMLINUX_SYMBOL_STR(del_gendisk) },
+ { 0x68a9f991, __VMLINUX_SYMBOL_STR(nvlist_add_uint16_array) },
+ { 0x6d934b7c, __VMLINUX_SYMBOL_STR(nv_fixed_ops) },
+ { 0x6a36f138, __VMLINUX_SYMBOL_STR(zpool_prop_feature) },
+ { 0xe0b0dd84, __VMLINUX_SYMBOL_STR(crgetfsgid) },
+ { 0x4554b079, __VMLINUX_SYMBOL_STR(bio_add_page) },
+ { 0xe8856dea, __VMLINUX_SYMBOL_STR(nvlist_remove_nvpair) },
+ { 0x35b9d4a6, __VMLINUX_SYMBOL_STR(nvlist_add_nvlist_array) },
+ { 0x75a78768, __VMLINUX_SYMBOL_STR(nvlist_alloc) },
+ { 0xa26a953e, __VMLINUX_SYMBOL_STR(fletcher_2_byteswap) },
+ { 0x27655c15, __VMLINUX_SYMBOL_STR(zfs_allocatable_devs) },
+ { 0x7c1372e8, __VMLINUX_SYMBOL_STR(panic) },
+ { 0x4c9d28b0, __VMLINUX_SYMBOL_STR(phys_base) },
+ { 0xe2fd64d6, __VMLINUX_SYMBOL_STR(nvpair_value_hrtime) },
+ { 0xa1c76e0a, __VMLINUX_SYMBOL_STR(_cond_resched) },
+ { 0xb940ee11, __VMLINUX_SYMBOL_STR(taskq_wait) },
+ { 0x9166fada, __VMLINUX_SYMBOL_STR(strncpy) },
+ { 0x19272247, __VMLINUX_SYMBOL_STR(__kstat_set_raw_ops) },
+ { 0x422932ac, __VMLINUX_SYMBOL_STR(nvlist_lookup_int32) },
+ { 0x6f3b39e8, __VMLINUX_SYMBOL_STR(blkdev_get_by_path) },
+ { 0xd34ddc39, __VMLINUX_SYMBOL_STR(security_inode_init_security) },
+ { 0x5da2ce8d, __VMLINUX_SYMBOL_STR(check_disk_size_change) },
+ { 0x78a1f8cc, __VMLINUX_SYMBOL_STR(blk_register_region) },
+ { 0x5a921311, __VMLINUX_SYMBOL_STR(strncmp) },
+ { 0x5792f848, __VMLINUX_SYMBOL_STR(strlcpy) },
+ { 0xbf8ba54a, __VMLINUX_SYMBOL_STR(vprintk) },
+ { 0x9abdea30, __VMLINUX_SYMBOL_STR(mutex_lock) },
+ { 0xfd5cf105, __VMLINUX_SYMBOL_STR(set_nlink) },
+ { 0x848a13bc, __VMLINUX_SYMBOL_STR(write_cache_pages) },
+ { 0xa340453c, __VMLINUX_SYMBOL_STR(system_taskq) },
+ { 0x13401075, __VMLINUX_SYMBOL_STR(taskq_dispatch) },
+ { 0xc8f88566, __VMLINUX_SYMBOL_STR(nvpair_value_uint16) },
+ { 0x521445b, __VMLINUX_SYMBOL_STR(list_del) },
+ { 0xebcbce8b, __VMLINUX_SYMBOL_STR(avl_insert) },
+ { 0x60df1e3b, __VMLINUX_SYMBOL_STR(posix_acl_equiv_mode) },
+ { 0x6c2c274e, __VMLINUX_SYMBOL_STR(spl_vmem_zalloc) },
+ { 0x71a50dbc, __VMLINUX_SYMBOL_STR(register_blkdev) },
+ { 0xc5fdef94, __VMLINUX_SYMBOL_STR(call_usermodehelper) },
+ { 0x9b4571df, __VMLINUX_SYMBOL_STR(nvpair_value_int32_array) },
+ { 0x299282df, __VMLINUX_SYMBOL_STR(uioskip) },
+ { 0xb7bfb080, __VMLINUX_SYMBOL_STR(insert_inode_locked) },
+ { 0xf02c7e5, __VMLINUX_SYMBOL_STR(avl_create) },
+ { 0xafa476dd, __VMLINUX_SYMBOL_STR(nvpair_value_int8) },
+ { 0x90782bf3, __VMLINUX_SYMBOL_STR(nvlist_add_string) },
+ { 0x90c7c2cd, __VMLINUX_SYMBOL_STR(wait_on_page_bit) },
+ { 0x5559ab10, __VMLINUX_SYMBOL_STR(zfs_deleg_whokey) },
+ { 0xcfba95c9, __VMLINUX_SYMBOL_STR(uiocopy) },
+ { 0x5de75127, __VMLINUX_SYMBOL_STR(unlock_page) },
+ { 0x3b4ceb4a, __VMLINUX_SYMBOL_STR(up_write) },
+ { 0x4c5e4353, __VMLINUX_SYMBOL_STR(shrink_dcache_sb) },
+ { 0x431a8a2c, __VMLINUX_SYMBOL_STR(ddi_copyout) },
+ { 0xe6e3b875, __VMLINUX_SYMBOL_STR(down_write) },
+ { 0xcc762837, __VMLINUX_SYMBOL_STR(kstat_waitq_enter) },
+ { 0x67236929, __VMLINUX_SYMBOL_STR(get_disk) },
+ { 0x1b27ac37, __VMLINUX_SYMBOL_STR(crgetgid) },
+ { 0x64623de, __VMLINUX_SYMBOL_STR(kmem_vasprintf) },
+ { 0xb653c4c5, __VMLINUX_SYMBOL_STR(avl_destroy_nodes) },
+ { 0xd16645b6, __VMLINUX_SYMBOL_STR(fnvlist_add_nvlist) },
+ { 0x89f2142a, __VMLINUX_SYMBOL_STR(nvpair_value_nvlist_array) },
+ { 0x2d03c10d, __VMLINUX_SYMBOL_STR(posix_acl_create) },
+ { 0xd42a96fa, __VMLINUX_SYMBOL_STR(nvpair_name) },
+ { 0x52778ec7, __VMLINUX_SYMBOL_STR(vcmn_err) },
+ { 0xdd5fbc2b, __VMLINUX_SYMBOL_STR(bio_endio) },
+ { 0x867c68af, __VMLINUX_SYMBOL_STR(bio_put) },
+ { 0xc0fba65a, __VMLINUX_SYMBOL_STR(generic_removexattr) },
+ { 0x97fb9a11, __VMLINUX_SYMBOL_STR(__cv_broadcast) },
+ { 0x3323ccb1, __VMLINUX_SYMBOL_STR(tsd_get) },
+ { 0xc1092877, __VMLINUX_SYMBOL_STR(mark_page_accessed) },
+ { 0x180d429, __VMLINUX_SYMBOL_STR(nvlist_add_int64_array) },
+ { 0x53bddca5, __VMLINUX_SYMBOL_STR(taskq_dispatch_ent) },
+ { 0x61651be, __VMLINUX_SYMBOL_STR(strcat) },
+ { 0x31a78843, __VMLINUX_SYMBOL_STR(vm_stat) },
+ { 0x3d276170, __VMLINUX_SYMBOL_STR(avl_first) },
+ { 0x10761aa5, __VMLINUX_SYMBOL_STR(crgetfsuid) },
+ { 0x1bc61496, __VMLINUX_SYMBOL_STR(nvpair_value_int16_array) },
+ { 0xb5a459dc, __VMLINUX_SYMBOL_STR(unregister_blkdev) },
+ { 0x44d67461, __VMLINUX_SYMBOL_STR(__cv_wait_io) },
+ { 0xb428a99c, __VMLINUX_SYMBOL_STR(zfs_deleg_verify_nvlist) },
+ { 0x4f6d74cf, __VMLINUX_SYMBOL_STR(inode_init_once) },
+ { 0x1bfac311, __VMLINUX_SYMBOL_STR(nvlist_lookup_nvlist) },
+ { 0x7479525e, __VMLINUX_SYMBOL_STR(fnvlist_add_uint64_array) },
+ { 0x9d9f80c4, __VMLINUX_SYMBOL_STR(nvlist_free) },
+ { 0x50c5246d, __VMLINUX_SYMBOL_STR(nvlist_add_uint8) },
+ { 0x5d6e0bba, __VMLINUX_SYMBOL_STR(nvlist_lookup_uint64) },
+ { 0xc4076f47, __VMLINUX_SYMBOL_STR(submit_bio) },
+ { 0xc6cbbc89, __VMLINUX_SYMBOL_STR(capable) },
+ { 0x6be0bc63, __VMLINUX_SYMBOL_STR(init_task) },
+ { 0xce900af, __VMLINUX_SYMBOL_STR(blk_finish_plug) },
+ { 0xb1c3a01a, __VMLINUX_SYMBOL_STR(oops_in_progress) },
+ { 0x9f984513, __VMLINUX_SYMBOL_STR(strrchr) },
+ { 0x55de2e28, __VMLINUX_SYMBOL_STR(z_compress_level) },
+ { 0x972d5d67, __VMLINUX_SYMBOL_STR(ilookup) },
+ { 0x81376bfd, __VMLINUX_SYMBOL_STR(vn_remove) },
+ { 0x1a86fdbf, __VMLINUX_SYMBOL_STR(blkdev_put) },
+ { 0xc50bab05, __VMLINUX_SYMBOL_STR(unregister_shrinker) },
+ { 0xe8adb6d8, __VMLINUX_SYMBOL_STR(nvpair_value_boolean_value) },
+ { 0x81483072, __VMLINUX_SYMBOL_STR(nvlist_add_uint16) },
+ { 0xe0d8ba54, __VMLINUX_SYMBOL_STR(simple_dir_operations) },
+ { 0x7fc02f17, __VMLINUX_SYMBOL_STR(generic_file_mmap) },
+ { 0x12a38747, __VMLINUX_SYMBOL_STR(usleep_range) },
+ { 0xe61d6e03, __VMLINUX_SYMBOL_STR(__cv_wait) },
+ { 0xf76b5740, __VMLINUX_SYMBOL_STR(crfree) },
+ { 0x1cd81596, __VMLINUX_SYMBOL_STR(nvlist_unpack) },
+ { 0x55610108, __VMLINUX_SYMBOL_STR(blk_queue_make_request) },
+ {  0x1e77f, __VMLINUX_SYMBOL_STR(nvlist_add_int32_array) },
+ { 0x7add44b5, __VMLINUX_SYMBOL_STR(posix_acl_valid) },
+ { 0xaeab70e4, __VMLINUX_SYMBOL_STR(zfs_prop_default_numeric) },
+ { 0x116a62b5, __VMLINUX_SYMBOL_STR(uiomove) },
+ { 0x504b2a, __VMLINUX_SYMBOL_STR(blk_queue_physical_block_size) },
+ { 0x8077db89, __VMLINUX_SYMBOL_STR(nvlist_lookup_nv_alloc) },
+ { 0xf7b48661, __VMLINUX_SYMBOL_STR(vn_set_pwd) },
+ { 0xcb59902f, __VMLINUX_SYMBOL_STR(nvlist_lookup_byte_array) },
+ { 0xf0fdf6cb, __VMLINUX_SYMBOL_STR(__stack_chk_fail) },
+ { 0xc311ec22, __VMLINUX_SYMBOL_STR(cpu_possible_mask) },
+ { 0x3bd1b1f6, __VMLINUX_SYMBOL_STR(msecs_to_jiffies) },
+ { 0xfe56e2a4, __VMLINUX_SYMBOL_STR(nvpair_value_int16) },
+ { 0xcc8e80f8, __VMLINUX_SYMBOL_STR(kstat_runq_exit) },
+ { 0x1000e51, __VMLINUX_SYMBOL_STR(schedule) },
+ { 0x958b84e3, __VMLINUX_SYMBOL_STR(tsd_create) },
+ { 0xed8a9209, __VMLINUX_SYMBOL_STR(spl_kmem_cache_create) },
+ { 0x20173f35, __VMLINUX_SYMBOL_STR(taskq_wait_outstanding) },
+ { 0xe6eac7c3, __VMLINUX_SYMBOL_STR(posix_acl_from_xattr) },
+ { 0x60695c15, __VMLINUX_SYMBOL_STR(__kstat_create) },
+ { 0x9b0973c0, __VMLINUX_SYMBOL_STR(kobj_read_file) },
+ { 0x58390d3, __VMLINUX_SYMBOL_STR(put_disk) },
+ { 0xdc2cbf2b, __VMLINUX_SYMBOL_STR(do_sync_read) },
+ { 0xeebd4852, __VMLINUX_SYMBOL_STR(unlock_new_inode) },
+ { 0x2bbdb1d2, __VMLINUX_SYMBOL_STR(nvlist_add_uint32) },
+ { 0xb4fd1b24, __VMLINUX_SYMBOL_STR(deactivate_super) },
+ { 0x6d6d5de2, __VMLINUX_SYMBOL_STR(bdi_setup_and_register) },
+ { 0x447bea0b, __VMLINUX_SYMBOL_STR(fnvpair_value_uint64) },
+ { 0x2e36ff5c, __VMLINUX_SYMBOL_STR(nvlist_remove_all) },
+ { 0x6dc38171, __VMLINUX_SYMBOL_STR(fnvlist_add_boolean) },
+ { 0xd94959c7, __VMLINUX_SYMBOL_STR(fletcher_4_native) },
+ { 0x5e95b1cd, __VMLINUX_SYMBOL_STR(current_umask) },
+ { 0xb948e867, __VMLINUX_SYMBOL_STR(zfs_prop_userquota) },
+ { 0xd0920999, __VMLINUX_SYMBOL_STR(nvpair_value_uint32) },
+ { 0xc5ca5da8, __VMLINUX_SYMBOL_STR(nvlist_merge) },
+ { 0xfe172afe, __VMLINUX_SYMBOL_STR(spl_vmem_alloc) },
+ { 0xdeea79ca, __VMLINUX_SYMBOL_STR(nvlist_add_int8) },
+ { 0x723294f9, __VMLINUX_SYMBOL_STR(d_prune_aliases) },
+ { 0xa66d5be1, __VMLINUX_SYMBOL_STR(spl_kmem_cache_alloc) },
+ { 0xbdfb6dbb, __VMLINUX_SYMBOL_STR(__fentry__) },
+ { 0x6b63f55e, __VMLINUX_SYMBOL_STR(heap_arena) },
+ { 0x2e1a09e1, __VMLINUX_SYMBOL_STR(clear_page_dirty_for_io) },
+ { 0xe4a8abdd, __VMLINUX_SYMBOL_STR(inode_change_ok) },
+ { 0xa3a77c69, __VMLINUX_SYMBOL_STR(down_read_trylock) },
+ { 0x123f82f3, __VMLINUX_SYMBOL_STR(getrawmonotonic64) },
+ { 0x65f3602b, __VMLINUX_SYMBOL_STR(vn_releasef) },
+ { 0x39fba8f8, __VMLINUX_SYMBOL_STR(path_put) },
+ { 0x4b88e0e9, __VMLINUX_SYMBOL_STR(zpool_get_rewind_policy) },
+ { 0x41fdac38, __VMLINUX_SYMBOL_STR(__cv_init) },
+ { 0xd52bf1ce, __VMLINUX_SYMBOL_STR(_raw_spin_lock) },
+ { 0x2168361b, __VMLINUX_SYMBOL_STR(fnvlist_add_nvlist_array) },
+ { 0xf194dd6f, __VMLINUX_SYMBOL_STR(read_cache_pages) },
+ { 0xb6445021, __VMLINUX_SYMBOL_STR(zpool_prop_init) },
+ { 0x9327f5ce, __VMLINUX_SYMBOL_STR(_raw_spin_lock_irqsave) },
+ { 0xe9167510, __VMLINUX_SYMBOL_STR(fnvpair_value_string) },
+ { 0x7521d525, __VMLINUX_SYMBOL_STR(fnvlist_lookup_string) },
+ { 0x1b8f1d1e, __VMLINUX_SYMBOL_STR(strfree) },
+ { 0x97e1f970, __VMLINUX_SYMBOL_STR(register_filesystem) },
+ { 0xdafb8f63, __VMLINUX_SYMBOL_STR(zpool_name_to_prop) },
+ { 0x29c88b11, __VMLINUX_SYMBOL_STR(nvlist_next_nvpair) },
+ { 0x99195078, __VMLINUX_SYMBOL_STR(vsnprintf) },
+ { 0x191c2770, __VMLINUX_SYMBOL_STR(u8_textprep_str) },
+ { 0x54f92a75, __VMLINUX_SYMBOL_STR(__cv_wait_sig) },
+ { 0x88163724, __VMLINUX_SYMBOL_STR(zfs_prop_user) },
+ { 0xcc2d3792, __VMLINUX_SYMBOL_STR(__test_set_page_writeback) },
+ { 0x48ece843, __VMLINUX_SYMBOL_STR(vn_open) },
+ { 0xa456b044, __VMLINUX_SYMBOL_STR(zfs_prop_readonly) },
+ { 0x82027a4c, __VMLINUX_SYMBOL_STR(cmn_err) },
+ { 0x30450b4d, __VMLINUX_SYMBOL_STR(avl_find) },
+ { 0xc43ab895, __VMLINUX_SYMBOL_STR(nvlist_add_boolean_value) },
+ { 0xe6990065, __VMLINUX_SYMBOL_STR(fletcher_4_incremental_byteswap) },
+ { 0x4123990a, __VMLINUX_SYMBOL_STR(__cv_timedwait_sig) },
+ { 0x8dfdd77d, __VMLINUX_SYMBOL_STR(fnvpair_value_int32) },
+ { 0x4c82bcb5, __VMLINUX_SYMBOL_STR(nvlist_add_byte) },
+ { 0xe644f4ea, __VMLINUX_SYMBOL_STR(iput) },
+ { 0xa0ed48c9, __VMLINUX_SYMBOL_STR(fnvlist_lookup_nvlist) },
+ { 0x6db955bf, __VMLINUX_SYMBOL_STR(nvpair_type) },
+ { 0xd8e07779, __VMLINUX_SYMBOL_STR(ddi_copyin) },
+ { 0x1285cb78, __VMLINUX_SYMBOL_STR(tsd_set) },
+ { 0x3896a905, __VMLINUX_SYMBOL_STR(__thread_exit) },
+ { 0x37a0cba, __VMLINUX_SYMBOL_STR(kfree) },
+ { 0x531d58c3, __VMLINUX_SYMBOL_STR(zpool_prop_index_to_string) },
+ { 0xd234c7f7, __VMLINUX_SYMBOL_STR(nvlist_add_nvpair) },
+ { 0x9559e8eb, __VMLINUX_SYMBOL_STR(do_sync_write) },
+ { 0x69acdf38, __VMLINUX_SYMBOL_STR(memcpy) },
+ { 0xaca70cba, __VMLINUX_SYMBOL_STR(spl_kmem_cache_set_move) },
+ { 0x5ecf6f91, __VMLINUX_SYMBOL_STR(vn_mode_to_vtype) },
+ { 0x4470a79b, __VMLINUX_SYMBOL_STR(param_ops_long) },
+ { 0x18b8916c, __VMLINUX_SYMBOL_STR(d_splice_alias) },
+ { 0x9518b623, __VMLINUX_SYMBOL_STR(register_shrinker) },
+ { 0xbc28fd2e, __VMLINUX_SYMBOL_STR(add_disk) },
+ { 0x4b2cb038, __VMLINUX_SYMBOL_STR(zfs_prop_index_to_string) },
+ { 0xd1c1752d, __VMLINUX_SYMBOL_STR(zfs_zpl_version_map) },
+ { 0xe81f35f9, __VMLINUX_SYMBOL_STR(avl_walk) },
+ { 0xf715d7e4, __VMLINUX_SYMBOL_STR(fletcher_4_byteswap) },
+ { 0x86f43149, __VMLINUX_SYMBOL_STR(zfs_userquota_prop_prefixes) },
+ { 0xf68905fd, __VMLINUX_SYMBOL_STR(ddi_strtoull) },
+ { 0xa66275ba, __VMLINUX_SYMBOL_STR(generic_readlink) },
+ { 0x334c1f75, __VMLINUX_SYMBOL_STR(put_page) },
+ { 0xfb5e53dc, __VMLINUX_SYMBOL_STR(d_make_root) },
+ { 0x669a7116, __VMLINUX_SYMBOL_STR(bdi_destroy) },
+ { 0x4cbbd171, __VMLINUX_SYMBOL_STR(__bitmap_weight) },
+ { 0x4b69abe5, __VMLINUX_SYMBOL_STR(nvpair_value_byte) },
+ { 0x730e1886, __VMLINUX_SYMBOL_STR(nvlist_size) },
+ { 0xd7e6464c, __VMLINUX_SYMBOL_STR(fletcher_2_native) },
+ { 0x213f7bd5, __VMLINUX_SYMBOL_STR(ioctl_by_bdev) },
+ { 0x8ab99acf, __VMLINUX_SYMBOL_STR(fnvlist_pack) },
+ { 0xd235532c, __VMLINUX_SYMBOL_STR(unregister_filesystem) },
+ { 0x971f06a3, __VMLINUX_SYMBOL_STR(init_special_inode) },
+ { 0x3445acf6, __VMLINUX_SYMBOL_STR(kobj_open_file) },
+ { 0x6fd040ec, __VMLINUX_SYMBOL_STR(generic_segment_checks) },
+ { 0xa09e6d9c, __VMLINUX_SYMBOL_STR(avl_add) },
+ { 0x8a51e16a, __VMLINUX_SYMBOL_STR(groupmember) },
+ { 0x4ea06afa, __VMLINUX_SYMBOL_STR(nvlist_add_byte_array) },
+ { 0x28318305, __VMLINUX_SYMBOL_STR(snprintf) },
+ { 0x28423f49, __VMLINUX_SYMBOL_STR(bdget) },
+ { 0x925e00bb, __VMLINUX_SYMBOL_STR(blk_queue_max_segment_size) },
+ { 0xe78ff332, __VMLINUX_SYMBOL_STR(__kstat_delete) },
+ { 0xa3de192d, __VMLINUX_SYMBOL_STR(fnvlist_add_string) },
+ { 0x504be4f9, __VMLINUX_SYMBOL_STR(nvlist_add_int16) },
+ { 0xec1cce40, __VMLINUX_SYMBOL_STR(nvlist_lookup_nvlist_array) },
+ { 0xd434cca4, __VMLINUX_SYMBOL_STR(new_inode) },
+ { 0xb0e602eb, __VMLINUX_SYMBOL_STR(memmove) },
+ { 0x43c69f9a, __VMLINUX_SYMBOL_STR(zpool_prop_default_numeric) },
+ { 0x18e6b5cd, __VMLINUX_SYMBOL_STR(vmalloc_to_page) },
+ { 0x6d16801a, __VMLINUX_SYMBOL_STR(spl_kmem_free) },
+ { 0x8eb2664d, __VMLINUX_SYMBOL_STR(fnvlist_remove_nvpair) },
+ { 0x9165990f, __VMLINUX_SYMBOL_STR(follow_down_one) },
+ { 0xf10c9794, __VMLINUX_SYMBOL_STR(spl_kmem_cache_reap_now) },
+ { 0xaa9db9bb, __VMLINUX_SYMBOL_STR(nvlist_add_uint64_array) },
+ { 0xad3e6d7f, __VMLINUX_SYMBOL_STR(blkdev_get) },
+ { 0xc236e29a, __VMLINUX_SYMBOL_STR(zfs_prop_default_string) },
+ { 0xa549c7f5, __VMLINUX_SYMBOL_STR(simple_dir_inode_operations) },
+ { 0x47805038, __VMLINUX_SYMBOL_STR(__thread_create) },
+ { 0xff749bc, __VMLINUX_SYMBOL_STR(spl_vmem_free) },
+ { 0x77e2f33, __VMLINUX_SYMBOL_STR(_copy_from_user) },
+ { 0xb3e56341, __VMLINUX_SYMBOL_STR(taskq_cancel_id) },
+ { 0xe5d95985, __VMLINUX_SYMBOL_STR(param_ops_ulong) },
+ { 0x903e74ba, __VMLINUX_SYMBOL_STR(nv_alloc_fini) },
+ { 0x6d044c26, __VMLINUX_SYMBOL_STR(param_ops_uint) },
+ { 0x9f249c9a, __VMLINUX_SYMBOL_STR(bdget_disk) },
+ { 0xa66a6969, __VMLINUX_SYMBOL_STR(nvpair_value_nvlist) },
+ { 0x913c50e8, __VMLINUX_SYMBOL_STR(clear_inode) },
+ { 0x925520d2, __VMLINUX_SYMBOL_STR(blk_start_plug) },
+ { 0xa1012e43, __VMLINUX_SYMBOL_STR(misc_deregister) },
+ { 0xf91d3b5a, __VMLINUX_SYMBOL_STR(nvlist_dup) },
+ { 0xc041d114, __VMLINUX_SYMBOL_STR(bdput) },
+ { 0x26709638, __VMLINUX_SYMBOL_STR(d_instantiate) },
+ { 0x2a6e6109, __VMLINUX_SYMBOL_STR(__init_rwsem) },
+ { 0xb8a102e9, __VMLINUX_SYMBOL_STR(taskq_dispatch_delay) },
+ { 0x2821e0b2, __VMLINUX_SYMBOL_STR(nvlist_lookup_uint64_array) },
+ { 0xbccac85e, __VMLINUX_SYMBOL_STR(p0) },
+ { 0x1d464809, __VMLINUX_SYMBOL_STR(__cv_destroy) },
+ { 0x38dbd03a, __VMLINUX_SYMBOL_STR(dataset_namecheck) },
+ { 0x5fb4b61d, __VMLINUX_SYMBOL_STR(fnvlist_dup) },
+ { 0x5f883970, __VMLINUX_SYMBOL_STR(generic_fillattr) },
+ { 0xb07671f9, __VMLINUX_SYMBOL_STR(vn_openat) },
+ { 0xe914e41e, __VMLINUX_SYMBOL_STR(strcpy) },
+ { 0xaee2ce2a, __VMLINUX_SYMBOL_STR(set_disk_ro) },
+ { 0x9b0325e8, __VMLINUX_SYMBOL_STR(spl_kmem_zalloc) },
+ { 0x75907276, __VMLINUX_SYMBOL_STR(kmem_debugging) },
+ { 0xc3ff0fa1, __VMLINUX_SYMBOL_STR(nvpair_value_uint8) },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=spl,znvpair,zcommon,zunicode,zavl";
+
+
+MODULE_INFO(srcversion, "D1D789E4C7DAA00271A861B");
+MODULE_INFO(rhelversion, "7.3");
diff --git a/zfs/module/zfs/zfs_ctldir.c b/zfs/module/zfs/zfs_ctldir.c
index ebf60408da43..2e1aa75fe332 100644
--- a/zfs/module/zfs/zfs_ctldir.c
+++ b/zfs/module/zfs/zfs_ctldir.c
@@ -499,6 +499,9 @@ zfsctl_inode_alloc(zfs_sb_t *zsb, uint64_t id,
  ip->i_ctime = now;
  ip->i_fop = fops;
  ip->i_op = ops;
+#if defined(IOP_XATTR)
+ ip->i_opflags &= ~IOP_XATTR;
+#endif
 
  if (insert_inode_locked(ip)) {
  unlock_new_inode(ip);
diff --git a/zfs/module/zfs/zfs_vnops.c b/zfs/module/zfs/zfs_vnops.c
index 384a37fea5c0..437a63a638d1 100644
--- a/zfs/module/zfs/zfs_vnops.c
+++ b/zfs/module/zfs/zfs_vnops.c
@@ -1602,13 +1602,13 @@ zfs_remove(struct inode *dip, char *name, cred_t *cr)
  error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
  if (error) {
  zfs_dirent_unlock(dl);
- iput(ip);
- if (xzp)
- iput(ZTOI(xzp));
  if (error == ERESTART) {
  waited = B_TRUE;
  dmu_tx_wait(tx);
  dmu_tx_abort(tx);
+ iput(ip);
+ if (xzp)
+ iput(ZTOI(xzp));
  goto top;
  }
 #ifdef HAVE_PN_UTILS
@@ -1616,6 +1616,9 @@ zfs_remove(struct inode *dip, char *name, cred_t *cr)
  pn_free(realnmp);
 #endif /* HAVE_PN_UTILS */
  dmu_tx_abort(tx);
+ iput(ip);
+ if (xzp)
+ iput(ZTOI(xzp));
  ZFS_EXIT(zsb);
  return (error);
  }
@@ -1944,14 +1947,15 @@ zfs_rmdir(struct inode *dip, char *name, struct inode *cwd, cred_t *cr,
  rw_exit(&zp->z_parent_lock);
  rw_exit(&zp->z_name_lock);
  zfs_dirent_unlock(dl);
- iput(ip);
  if (error == ERESTART) {
  waited = B_TRUE;
  dmu_tx_wait(tx);
  dmu_tx_abort(tx);
+ iput(ip);
  goto top;
  }
  dmu_tx_abort(tx);
+ iput(ip);
  ZFS_EXIT(zsb);
  return (error);
  }
@@ -3025,8 +3029,6 @@ zfs_setattr(struct inode *ip, vattr_t *vap, int flags, cred_t *cr)
  ASSERT(err2 == 0);
  }
 
- if (attrzp)
- iput(ZTOI(attrzp));
  if (aclp)
  zfs_acl_free(aclp);
 
@@ -3037,11 +3039,15 @@ zfs_setattr(struct inode *ip, vattr_t *vap, int flags, cred_t *cr)
 
  if (err) {
  dmu_tx_abort(tx);
+ if (attrzp)
+ iput(ZTOI(attrzp));
  if (err == ERESTART)
  goto top;
  } else {
  err2 = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx);
  dmu_tx_commit(tx);
+ if (attrzp)
+ iput(ZTOI(attrzp));
  zfs_inode_update(zp);
  }
 
@@ -3074,7 +3080,7 @@ zfs_rename_unlock(zfs_zlock_t **zlpp)
 
  while ((zl = *zlpp) != NULL) {
  if (zl->zl_znode != NULL)
- iput(ZTOI(zl->zl_znode));
+ zfs_iput_async(ZTOI(zl->zl_znode));
  rw_exit(zl->zl_rwlock);
  *zlpp = zl->zl_next;
  kmem_free(zl, sizeof (*zl));
@@ -3411,16 +3417,19 @@ zfs_rename(struct inode *sdip, char *snm, struct inode *tdip, char *tnm,
  if (sdzp == tdzp)
  rw_exit(&sdzp->z_name_lock);
 
- iput(ZTOI(szp));
- if (tzp)
- iput(ZTOI(tzp));
  if (error == ERESTART) {
  waited = B_TRUE;
  dmu_tx_wait(tx);
  dmu_tx_abort(tx);
+ iput(ZTOI(szp));
+ if (tzp)
+ iput(ZTOI(tzp));
  goto top;
  }
  dmu_tx_abort(tx);
+ iput(ZTOI(szp));
+ if (tzp)
+ iput(ZTOI(tzp));
  ZFS_EXIT(zsb);
  return (error);
  }
diff --git a/zfs/module/zfs/zio.c b/zfs/module/zfs/zio.c
index 2bc88c52c9b0..e06b7da44f39 100644
--- a/zfs/module/zfs/zio.c
+++ b/zfs/module/zfs/zio.c
@@ -139,10 +139,10 @@ zio_init(void)
  if (arc_watch && !IS_P2ALIGNED(size, PAGESIZE))
  continue;
 #endif
- if (size <= 4 * SPA_MINBLOCKSIZE) {
+ if (size < PAGESIZE) {
  align = SPA_MINBLOCKSIZE;
  } else if (IS_P2ALIGNED(size, p2 >> 2)) {
- align = MIN(p2 >> 2, PAGESIZE);
+ align = PAGESIZE;
  }
 
  if (align != 0) {
diff --git a/zfs/module/zfs/zpl_ctldir.c b/zfs/module/zfs/zpl_ctldir.c
index e31764fb620b..50fb06bdef80 100644
--- a/zfs/module/zfs/zpl_ctldir.c
+++ b/zfs/module/zfs/zpl_ctldir.c
@@ -380,11 +380,10 @@ zpl_snapdir_getattr_impl(const struct path *path, struct kstat *stat,
     u32 request_mask, unsigned int query_flags)
 {
  struct inode *ip = path->dentry->d_inode;
- zfs_sb_t *zsb = ITOZSB(ip);
+ zfs_sb_t *zsb = ITOZSB(path->dentry->d_inode);
 
  ZFS_ENTER(zsb);
- generic_fillattr(ip, stat);
-
+ generic_fillattr(path->dentry->d_inode, stat);
  stat->nlink = stat->size = 2;
  stat->ctime = stat->mtime = dmu_objset_snap_cmtime(zsb->z_os);
  stat->atime = current_time(ip);
diff --git a/zfs/module/zfs/zpl_file.c b/zfs/module/zfs/zpl_file.c
index 19e8a6278eba..8781d8ca9605 100644
--- a/zfs/module/zfs/zpl_file.c
+++ b/zfs/module/zfs/zpl_file.c
@@ -857,9 +857,15 @@ const struct file_operations zpl_file_operations = {
  .release = zpl_release,
  .llseek = zpl_llseek,
 #ifdef HAVE_VFS_RW_ITERATE
+#ifdef HAVE_NEW_SYNC_READ
+ .read = new_sync_read,
+ .write = new_sync_write,
+#endif
  .read_iter = zpl_iter_read,
  .write_iter = zpl_iter_write,
 #else
+ .read = do_sync_read,
+ .write = do_sync_write,
  .aio_read = zpl_aio_read,
  .aio_write = zpl_aio_write,
 #endif
diff --git a/zfs/module/zfs/zpl_inode.c b/zfs/module/zfs/zpl_inode.c
index 88f333d22c61..18401fe3084e 100644
--- a/zfs/module/zfs/zpl_inode.c
+++ b/zfs/module/zfs/zpl_inode.c
@@ -50,7 +50,7 @@ zpl_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
  int zfs_flags = 0;
  zfs_sb_t *zsb = dentry->d_sb->s_fs_info;
 
- if (dlen(dentry) > ZFS_MAXNAMELEN)
+ if (dlen(dentry) >= ZAP_MAXNAMELEN)
  return (ERR_PTR(-ENAMETOOLONG));
 
  crhold(cr);
diff --git a/zfs/module/zpios/zpios.mod.c b/zfs/module/zpios/zpios.mod.c
new file mode 100644
index 000000000000..deaeebe9acce
--- /dev/null
+++ b/zfs/module/zpios/zpios.mod.c
@@ -0,0 +1,85 @@
+#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"))) = {
+ { 0x28950ef1, __VMLINUX_SYMBOL_STR(module_layout) },
+ { 0x6023ff19, __VMLINUX_SYMBOL_STR(dmu_tx_hold_free) },
+ { 0x8297790d, __VMLINUX_SYMBOL_STR(dmu_objset_create) },
+ { 0xe1a07d40, __VMLINUX_SYMBOL_STR(dmu_object_set_blocksize) },
+ { 0xda3e43d1, __VMLINUX_SYMBOL_STR(_raw_spin_unlock) },
+ { 0xee176c65, __VMLINUX_SYMBOL_STR(dmu_tx_abort) },
+ { 0xc8b57c27, __VMLINUX_SYMBOL_STR(autoremove_wake_function) },
+ { 0x79aa04a2, __VMLINUX_SYMBOL_STR(get_random_bytes) },
+ { 0x34184afe, __VMLINUX_SYMBOL_STR(current_kernel_time) },
+ { 0xb46da392, __VMLINUX_SYMBOL_STR(dmu_tx_wait) },
+ { 0xb342d16a, __VMLINUX_SYMBOL_STR(spl_kmem_alloc) },
+ { 0x4ed12f73, __VMLINUX_SYMBOL_STR(mutex_unlock) },
+ { 0xc35e4b4e, __VMLINUX_SYMBOL_STR(kthread_create_on_node) },
+ { 0xbc32eee7, __VMLINUX_SYMBOL_STR(spl_panic) },
+ { 0x35c2dc4c, __VMLINUX_SYMBOL_STR(dmu_tx_commit) },
+ { 0xf432dd3d, __VMLINUX_SYMBOL_STR(__init_waitqueue_head) },
+ { 0x71de9b3f, __VMLINUX_SYMBOL_STR(_copy_to_user) },
+ { 0xf23b2e74, __VMLINUX_SYMBOL_STR(misc_register) },
+ { 0xfb578fc5, __VMLINUX_SYMBOL_STR(memset) },
+ { 0xb8c7ff88, __VMLINUX_SYMBOL_STR(current_task) },
+ { 0x9a025cd5, __VMLINUX_SYMBOL_STR(__mutex_init) },
+ { 0x27e1a049, __VMLINUX_SYMBOL_STR(printk) },
+ { 0x42f90a31, __VMLINUX_SYMBOL_STR(kthread_stop) },
+ { 0x9e68e189, __VMLINUX_SYMBOL_STR(dmu_objset_disown) },
+ { 0x9166fada, __VMLINUX_SYMBOL_STR(strncpy) },
+ { 0x9abdea30, __VMLINUX_SYMBOL_STR(mutex_lock) },
+ { 0x6c2c274e, __VMLINUX_SYMBOL_STR(spl_vmem_zalloc) },
+ { 0xc5fdef94, __VMLINUX_SYMBOL_STR(call_usermodehelper) },
+ { 0x96f73dc7, __VMLINUX_SYMBOL_STR(dmu_write) },
+ { 0x952664c5, __VMLINUX_SYMBOL_STR(do_exit) },
+ { 0x7da403ec, __VMLINUX_SYMBOL_STR(dsl_destroy_head) },
+ { 0x99d9f249, __VMLINUX_SYMBOL_STR(dmu_objset_own) },
+ { 0xc0fdaa0f, __VMLINUX_SYMBOL_STR(dmu_object_free) },
+ { 0xf0fdf6cb, __VMLINUX_SYMBOL_STR(__stack_chk_fail) },
+ { 0xd62c833f, __VMLINUX_SYMBOL_STR(schedule_timeout) },
+ { 0x1000e51, __VMLINUX_SYMBOL_STR(schedule) },
+ { 0x4b2a14f9, __VMLINUX_SYMBOL_STR(dmu_object_alloc) },
+ { 0xfe172afe, __VMLINUX_SYMBOL_STR(spl_vmem_alloc) },
+ { 0xe65cdceb, __VMLINUX_SYMBOL_STR(wake_up_process) },
+ { 0x23bd73ce, __VMLINUX_SYMBOL_STR(dmu_tx_create) },
+ { 0xbdfb6dbb, __VMLINUX_SYMBOL_STR(__fentry__) },
+ { 0xd52bf1ce, __VMLINUX_SYMBOL_STR(_raw_spin_lock) },
+ { 0xcf21d241, __VMLINUX_SYMBOL_STR(__wake_up) },
+ { 0x69acdf38, __VMLINUX_SYMBOL_STR(memcpy) },
+ { 0x5c8b5ce8, __VMLINUX_SYMBOL_STR(prepare_to_wait) },
+ { 0xfa66f77c, __VMLINUX_SYMBOL_STR(finish_wait) },
+ { 0x1acff3a1, __VMLINUX_SYMBOL_STR(dmu_tx_assign) },
+ { 0x28318305, __VMLINUX_SYMBOL_STR(snprintf) },
+ { 0x6d16801a, __VMLINUX_SYMBOL_STR(spl_kmem_free) },
+ { 0x5648b508, __VMLINUX_SYMBOL_STR(dmu_read) },
+ { 0xff749bc, __VMLINUX_SYMBOL_STR(spl_vmem_free) },
+ { 0x77e2f33, __VMLINUX_SYMBOL_STR(_copy_from_user) },
+ { 0x2482e688, __VMLINUX_SYMBOL_STR(vsprintf) },
+ { 0xa1012e43, __VMLINUX_SYMBOL_STR(misc_deregister) },
+ { 0xd920669e, __VMLINUX_SYMBOL_STR(dmu_tx_hold_write) },
+ { 0x9b0325e8, __VMLINUX_SYMBOL_STR(spl_kmem_zalloc) },
+};
+
+static const char __module_depends[]
+__used
+__attribute__((section(".modinfo"))) =
+"depends=zfs,spl";
+
+
+MODULE_INFO(srcversion, "6224A8554C1154556C8A26B");
+MODULE_INFO(rhelversion, "7.3");
diff --git a/zfs/zfs_config.h.in b/zfs/zfs_config.h.in
index 5e1bfc8c4d6d..2304191987c1 100644
--- a/zfs/zfs_config.h.in
+++ b/zfs/zfs_config.h.in
@@ -288,6 +288,9 @@
 /* mount_nodev() is available */
 #undef HAVE_MOUNT_NODEV
 
+/* new_sync_read() is available */
+#undef HAVE_NEW_SYNC_READ
+
 /* sops->nr_cached_objects() exists */
 #undef HAVE_NR_CACHED_OBJECTS
 
--
2.11.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

APPLIED: [PATCH][ARTFUL] UBUNTU: SAUCE: (noup) Update spl to 0.6.5.10-1, zfs to 0.6.5.10-1ubuntu2

Seth Forshee
On Fri, Jul 07, 2017 at 04:06:16PM +0100, Colin King wrote:
> From: Colin Ian King <[hidden email]>
>
> This has been fully tested against 4.11/4.12 with the kernel
> team ZFS regression tests.
>
> Signed-off-by: Colin Ian King <[hidden email]>

Applied to artful/master-next and unstable/master, thanks.

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Loading...