From b97c779121a1aaf39aa9431dbfb45bf0e34cde6e Mon Sep 17 00:00:00 2001 From: Mo Zhou Date: Tue, 18 Sep 2018 01:41:34 +0000 Subject: [PATCH] New upstream version 0.7.11 --- META | 2 +- Makefile.in | 1 + aclocal.m4 | 1 + cmd/Makefile.in | 1 + cmd/splat/Makefile.in | 1 + cmd/splslab/Makefile.in | 1 + config/kernel-inode-times.m4 | 25 ++++++ config/spl-build.m4 | 1 + configure | 168 ++++++++++++++++++++++++++++++++--- copy-builtin | 27 +----- include/Makefile.in | 1 + include/fs/Makefile.in | 1 + include/linux/Makefile.in | 1 + include/rpc/Makefile.in | 1 + include/sharefs/Makefile.in | 1 + include/sys/Makefile.in | 1 + include/sys/condvar.h | 1 + include/sys/fm/Makefile.in | 1 + include/sys/fs/Makefile.in | 1 + include/sys/isa_defs.h | 8 ++ include/sys/kstat.h | 2 +- include/sys/rwlock.h | 10 +-- include/sys/time.h | 25 ++++-- include/sys/types.h | 3 - include/sys/vnode.h | 6 +- include/util/Makefile.in | 1 + include/vm/Makefile.in | 1 + lib/Makefile.in | 1 + man/Makefile.in | 1 + man/man1/Makefile.in | 1 + man/man5/Makefile.in | 1 + module/spl/spl-kstat.c | 4 +- module/spl/spl-rwlock.c | 19 ++-- module/spl/spl-vnode.c | 2 + rpm/Makefile.in | 1 + rpm/generic/Makefile.in | 1 + rpm/generic/spl-kmod.spec.in | 6 ++ rpm/generic/spl.spec.in | 6 ++ rpm/redhat/Makefile.in | 1 + rpm/redhat/spl.spec.in | 6 ++ scripts/Makefile.in | 1 + spl_config.h.in | 3 + 42 files changed, 285 insertions(+), 62 deletions(-) create mode 100644 config/kernel-inode-times.m4 diff --git a/META b/META index 95c9368..fc98597 100644 --- a/META +++ b/META @@ -1,7 +1,7 @@ Meta: 1 Name: spl Branch: 1.0 -Version: 0.7.9 +Version: 0.7.11 Release: 1 Release-Tags: relext License: GPL diff --git a/Makefile.in b/Makefile.in index 2a94d10..39bdcc4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -89,6 +89,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/aclocal.m4 b/aclocal.m4 index ca24a58..ffa4e90 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1020,6 +1020,7 @@ m4_include([config/kernel-ctl-table-name.m4]) m4_include([config/kernel-fallocate.m4]) m4_include([config/kernel-group-info.m4]) m4_include([config/kernel-inode-lock.m4]) +m4_include([config/kernel-inode-times.m4]) m4_include([config/kernel-kmem-cache.m4]) m4_include([config/kernel-kuidgid.m4]) m4_include([config/kernel-pde-data.m4]) diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 9958587..f9dff82 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -41,6 +41,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/cmd/splat/Makefile.in b/cmd/splat/Makefile.in index b14d551..e26ff0a 100644 --- a/cmd/splat/Makefile.in +++ b/cmd/splat/Makefile.in @@ -52,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/cmd/splslab/Makefile.in b/cmd/splslab/Makefile.in index 9d17274..c22aa07 100644 --- a/cmd/splslab/Makefile.in +++ b/cmd/splslab/Makefile.in @@ -42,6 +42,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/config/kernel-inode-times.m4 b/config/kernel-inode-times.m4 new file mode 100644 index 0000000..3a6acd8 --- /dev/null +++ b/config/kernel-inode-times.m4 @@ -0,0 +1,25 @@ +dnl # +dnl # 4.18 API change +dnl # i_atime, i_mtime, and i_ctime changed from timespec to timespec64. +dnl # +AC_DEFUN([SPL_AC_KERNEL_INODE_TIMES], [ + AC_MSG_CHECKING([whether inode->i_*time's are timespec64]) + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + SPL_LINUX_TRY_COMPILE([ + #include + ],[ + struct inode ip; + struct timespec ts; + + memset(&ip, 0, sizeof(ip)); + ts = ip.i_mtime; + ],[ + AC_MSG_RESULT(no) + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_INODE_TIMESPEC64_TIMES, 1, + [inode->i_*time's are timespec64]) + ]) + EXTRA_KCFLAGS="$tmp_flags" +]) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 5c6c02a..0dc5be8 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -43,6 +43,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ SPL_AC_2ARGS_VFS_GETATTR SPL_AC_USLEEP_RANGE SPL_AC_KMEM_CACHE_ALLOCFLAGS + SPL_AC_KERNEL_INODE_TIMES SPL_AC_WAIT_ON_BIT SPL_AC_INODE_LOCK SPL_AC_GROUP_INFO_GID diff --git a/configure b/configure index 7c40f9b..7621ac4 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for spl 0.7.9. +# Generated by GNU Autoconf 2.63 for spl 0.7.11. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -743,8 +743,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='spl' PACKAGE_TARNAME='spl' -PACKAGE_VERSION='0.7.9' -PACKAGE_STRING='spl 0.7.9' +PACKAGE_VERSION='0.7.11' +PACKAGE_STRING='spl 0.7.11' PACKAGE_BUGREPORT='' # Factoring default headers for most tests. @@ -1535,7 +1535,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.7.9 to adapt to many kinds of systems. +\`configure' configures spl 0.7.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1606,7 +1606,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of spl 0.7.9:";; + short | recursive ) echo "Configuration of spl 0.7.11:";; esac cat <<\_ACEOF @@ -1720,7 +1720,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -spl configure 0.7.9 +spl configure 0.7.11 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1734,7 +1734,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.7.9, which was +It was created by spl $as_me 0.7.11, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2888,7 +2888,7 @@ fi # Define the identity of the package. PACKAGE='spl' - VERSION='0.7.9' + VERSION='0.7.11' cat >>confdefs.h <<_ACEOF @@ -14402,6 +14402,80 @@ fi + { $as_echo "$as_me:$LINENO: checking whether inode->i_*time's are timespec64" >&5 +$as_echo_n "checking whether inode->i_*time's are timespec64... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct inode ip; + struct timespec ts; + + memset(&ip, 0, sizeof(ip)); + ts = ip.i_mtime; + + ; + return 0; +} + +_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 build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$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:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INODE_TIMESPEC64_TIMES 1 +_ACEOF + + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + { $as_echo "$as_me:$LINENO: checking whether wait_on_bit() takes an action" >&5 $as_echo_n "checking whether wait_on_bit() takes an action... " >&6; } @@ -17878,6 +17952,80 @@ fi + { $as_echo "$as_me:$LINENO: checking whether inode->i_*time's are timespec64" >&5 +$as_echo_n "checking whether inode->i_*time's are timespec64... " >&6; } + tmp_flags="$EXTRA_KCFLAGS" + EXTRA_KCFLAGS="-Werror" + + +cat confdefs.h - <<_ACEOF >conftest.c +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + + #include + +int +main (void) +{ + + struct inode ip; + struct timespec ts; + + memset(&ip, 0, sizeof(ip)); + ts = ip.i_mtime; + + ; + return 0; +} + +_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 build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build $modpost_flag' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + { $as_echo "$as_me:$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:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INODE_TIMESPEC64_TIMES 1 +_ACEOF + + + + +fi + + rm -Rf build + + + EXTRA_KCFLAGS="$tmp_flags" + + { $as_echo "$as_me:$LINENO: checking whether wait_on_bit() takes an action" >&5 $as_echo_n "checking whether wait_on_bit() takes an action... " >&6; } @@ -19246,7 +19394,7 @@ exec 6>&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.7.9, which was +This file was extended by spl $as_me 0.7.11, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19309,7 +19457,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -spl config.status 0.7.9 +spl config.status 0.7.11 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/copy-builtin b/copy-builtin index 34c482b..b8e3a08 100755 --- a/copy-builtin +++ b/copy-builtin @@ -88,32 +88,7 @@ EOF done } > "$KERNEL_DIR/spl/Kbuild" -add_after() -{ - local FILE="$1" - local MARKER="$2" - local NEW="$3" - local LINE - - while IFS='' read -r LINE - do - echo "$LINE" - - if [ -n "$MARKER" -a "$LINE" = "$MARKER" ] - then - echo "$NEW" - MARKER='' - if IFS='' read -r LINE - then - [ "$LINE" != "$NEW" ] && echo "$LINE" - fi - fi - done < "$FILE" > "$FILE.new" - - mv "$FILE.new" "$FILE" -} - -add_after "$KERNEL_DIR/Kconfig" 'source "arch/$SRCARCH/Kconfig"' 'source "spl/Kconfig"' +echo 'source "spl/Kconfig"' >>"$KERNEL_DIR/Kconfig" # We must take care to build SPL before ZFS, otherwise the symbols required # to link ZFS will not be available. sed -i 's~mm/ fs/~mm/ spl/ fs/~' "$KERNEL_DIR/Makefile" diff --git a/include/Makefile.in b/include/Makefile.in index 49ff14f..a7e2e02 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/include/fs/Makefile.in b/include/fs/Makefile.in index 1b43195..b3a69ed 100644 --- a/include/fs/Makefile.in +++ b/include/fs/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in index 65ea529..9d0713e 100644 --- a/include/linux/Makefile.in +++ b/include/linux/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/include/rpc/Makefile.in b/include/rpc/Makefile.in index 403cd41..75eadf0 100644 --- a/include/rpc/Makefile.in +++ b/include/rpc/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/include/sharefs/Makefile.in b/include/sharefs/Makefile.in index 0765d82..a705acf 100644 --- a/include/sharefs/Makefile.in +++ b/include/sharefs/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index 5c61b0f..7b2409c 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/include/sys/condvar.h b/include/sys/condvar.h index 5fcc906..ce3149a 100644 --- a/include/sys/condvar.h +++ b/include/sys/condvar.h @@ -31,6 +31,7 @@ #include #include #include +#include /* * The kcondvar_t struct is protected by mutex taken externally before diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in index 5547fff..14765b7 100644 --- a/include/sys/fm/Makefile.in +++ b/include/sys/fm/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in index 1a4e0a4..19859f9 100644 --- a/include/sys/fs/Makefile.in +++ b/include/sys/fs/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/include/sys/isa_defs.h b/include/sys/isa_defs.h index 5559782..13dcb35 100644 --- a/include/sys/isa_defs.h +++ b/include/sys/isa_defs.h @@ -210,6 +210,14 @@ #include +/* + * CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS will be defined by the Linux + * kernel for architectures which support efficient unaligned access. + */ +#if defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) +#define HAVE_EFFICIENT_UNALIGNED_ACCESS +#endif + #if defined(__LITTLE_ENDIAN) && !defined(_LITTLE_ENDIAN) #define _LITTLE_ENDIAN __LITTLE_ENDIAN #endif diff --git a/include/sys/kstat.h b/include/sys/kstat.h index 2018019..b8aa7ed 100644 --- a/include/sys/kstat.h +++ b/include/sys/kstat.h @@ -72,7 +72,7 @@ #define KSTAT_FLAG_UNSUPPORTED \ (KSTAT_FLAG_VAR_SIZE | KSTAT_FLAG_WRITABLE | \ KSTAT_FLAG_PERSISTENT | KSTAT_FLAG_DORMANT) - +#define KSTAT_FLAG_NO_HEADERS 0x80 #define KS_MAGIC 0x9d9d9d9d diff --git a/include/sys/rwlock.h b/include/sys/rwlock.h index 325dfc4..2699229 100644 --- a/include/sys/rwlock.h +++ b/include/sys/rwlock.h @@ -135,7 +135,7 @@ RW_LOCK_HELD(krwlock_t *rwp) } /* - * The following functions must be a #define and not static inline. + * The following functions must be a #define and not static inline. * This ensures that the native linux semaphore functions (down/up) * will be correctly located in the users code which is important * for the built in kernel lock analysis tools @@ -151,10 +151,10 @@ RW_LOCK_HELD(krwlock_t *rwp) spl_rw_set_type(rwp, type); \ }) -#define rw_destroy(rwp) \ -({ \ - VERIFY(!RW_LOCK_HELD(rwp)); \ -}) +/* + * The Linux rwsem implementation does not require a matching destroy. + */ +#define rw_destroy(rwp) ((void) 0) #define rw_tryenter(rwp, rw) \ ({ \ diff --git a/include/sys/time.h b/include/sys/time.h index ddda6de..59557af 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -52,15 +52,28 @@ #define NSEC2SEC(n) ((n) / (NANOSEC / SEC)) #define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC)) +typedef longlong_t hrtime_t; +typedef struct timespec timespec_t; + static const int hz = HZ; #define TIMESPEC_OVERFLOW(ts) \ ((ts)->tv_sec < TIME_MIN || (ts)->tv_sec > TIME_MAX) +#if defined(HAVE_INODE_TIMESPEC64_TIMES) +typedef struct timespec64 inode_timespec_t; +#else +typedef struct timespec inode_timespec_t; +#endif + static inline void -gethrestime(timestruc_t *now) -{ - *now = current_kernel_time(); +gethrestime(inode_timespec_t *ts) + { +#if defined(HAVE_INODE_TIMESPEC64_TIMES) + *ts = current_kernel_time64(); +#else + *ts = current_kernel_time(); +#endif } static inline time_t @@ -74,9 +87,9 @@ gethrestime_sec(void) static inline hrtime_t gethrtime(void) { - struct timespec now; - getrawmonotonic(&now); - return (((hrtime_t)now.tv_sec * NSEC_PER_SEC) + now.tv_nsec); + struct timespec ts; + getrawmonotonic(&ts); + return (((hrtime_t)ts.tv_sec * NSEC_PER_SEC) + ts.tv_nsec); } #endif /* _SPL_TIME_H */ diff --git a/include/sys/types.h b/include/sys/types.h index 2fe63b7..b958462 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -49,9 +49,6 @@ typedef long long offset_t; typedef struct task_struct kthread_t; typedef struct task_struct proc_t; typedef short pri_t; -typedef struct timespec timestruc_t; /* definition per SVr4 */ -typedef struct timespec timespec_t; -typedef longlong_t hrtime_t; typedef unsigned short ushort_t; typedef u_longlong_t len_t; typedef longlong_t diskaddr_t; diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 0ed4794..87f12d6 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -129,9 +129,9 @@ typedef struct vattr { long va_nodeid; /* node # */ uint32_t va_nlink; /* # links */ uint64_t va_size; /* file size */ - struct timespec va_atime; /* last acc */ - struct timespec va_mtime; /* last mod */ - struct timespec va_ctime; /* last chg */ + inode_timespec_t va_atime; /* last acc */ + inode_timespec_t va_mtime; /* last mod */ + inode_timespec_t va_ctime; /* last chg */ dev_t va_rdev; /* dev */ uint64_t va_nblocks; /* space used */ uint32_t va_blksize; /* block size */ diff --git a/include/util/Makefile.in b/include/util/Makefile.in index b62b1a8..d4d8a2c 100644 --- a/include/util/Makefile.in +++ b/include/util/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/include/vm/Makefile.in b/include/vm/Makefile.in index 65084d6..140dc0a 100644 --- a/include/vm/Makefile.in +++ b/include/vm/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/lib/Makefile.in b/lib/Makefile.in index b7fed09..1ecc852 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -51,6 +51,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/man/Makefile.in b/man/Makefile.in index 8c15e8d..ca9b4f0 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -41,6 +41,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/man/man1/Makefile.in b/man/man1/Makefile.in index 373e368..6b2d874 100644 --- a/man/man1/Makefile.in +++ b/man/man1/Makefile.in @@ -42,6 +42,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/man/man5/Makefile.in b/man/man5/Makefile.in index 15a7961..f44c609 100644 --- a/man/man5/Makefile.in +++ b/man/man5/Makefile.in @@ -42,6 +42,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index 6970fcc..f9b9015 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -388,7 +388,8 @@ kstat_seq_start(struct seq_file *f, loff_t *pos) ksp->ks_snaptime = gethrtime(); - if (!n && kstat_seq_show_headers(f)) + if (!(ksp->ks_flags & KSTAT_FLAG_NO_HEADERS) && !n && + kstat_seq_show_headers(f)) return (NULL); if (n >= ksp->ks_ndata) @@ -538,7 +539,6 @@ __kstat_create(const char *ks_module, int ks_instance, const char *ks_name, ASSERT(ks_module); ASSERT(ks_instance == 0); ASSERT(ks_name); - ASSERT(!(ks_flags & KSTAT_FLAG_UNSUPPORTED)); if ((ks_type == KSTAT_TYPE_INTR) || (ks_type == KSTAT_TYPE_IO)) ASSERT(ks_ndata == 1); diff --git a/module/spl/spl-rwlock.c b/module/spl/spl-rwlock.c index bf7ee2f..ac28c91 100644 --- a/module/spl/spl-rwlock.c +++ b/module/spl/spl-rwlock.c @@ -34,16 +34,24 @@ static int __rwsem_tryupgrade(struct rw_semaphore *rwsem) { - +#if defined(READER_BIAS) && defined(WRITER_BIAS) + /* + * After the 4.9.20-rt16 kernel the realtime patch series lifted the + * single reader restriction. While this could be accommodated by + * adding additional compatibility code assume the rwsem can never + * be upgraded. All caller must already cleanly handle this case. + */ + return (0); +#else ASSERT((struct task_struct *) ((unsigned long)rwsem->lock.owner & ~RT_MUTEX_OWNER_MASKALL) == current); /* - * Under the realtime patch series, rwsem is implemented as a - * single mutex held by readers and writers alike. However, - * this implementation would prevent a thread from taking a - * read lock twice, as the mutex would already be locked on + * Prior to 4.9.20-rt16 kernel the realtime patch series, rwsem is + * implemented as a single mutex held by readers and writers alike. + * However, this implementation would prevent a thread from taking + * a read lock twice, as the mutex would already be locked on * the second attempt. Therefore the implementation allows a * single thread to take a rwsem as read lock multiple times * tracking that nesting as read_depth counter. @@ -59,6 +67,7 @@ __rwsem_tryupgrade(struct rw_semaphore *rwsem) return (1); } return (0); +#endif } #elif defined(CONFIG_RWSEM_GENERIC_SPINLOCK) static int diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 74ae8fe..cd0015f 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -670,6 +670,8 @@ vn_file_cache_destructor(void *buf, void *cdrarg) int spl_vn_init(void) { + spin_lock_init(&vn_file_lock); + vn_cache = kmem_cache_create("spl_vn_cache", sizeof (struct vnode), 64, vn_cache_constructor, vn_cache_destructor, NULL, NULL, NULL, 0); diff --git a/rpm/Makefile.in b/rpm/Makefile.in index 44ec84f..3fb5ab0 100644 --- a/rpm/Makefile.in +++ b/rpm/Makefile.in @@ -41,6 +41,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/rpm/generic/Makefile.in b/rpm/generic/Makefile.in index 76ee55b..0a0faf7 100644 --- a/rpm/generic/Makefile.in +++ b/rpm/generic/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/rpm/generic/spl-kmod.spec.in b/rpm/generic/spl-kmod.spec.in index 9cd2225..4cc1faf 100644 --- a/rpm/generic/spl-kmod.spec.in +++ b/rpm/generic/spl-kmod.spec.in @@ -167,6 +167,12 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/* rm -rf $RPM_BUILD_ROOT %changelog +* Thu Sep 13 2018 Tony Hutter - 0.7.11-1 +- Released 0.7.11-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.11 +* Wed Sep 05 2018 Tony Hutter - 0.7.10-1 +- Released 0.7.10-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.10 * Tue May 08 2018 Tony Hutter - 0.7.9-1 - Released 0.7.9-1, detailed release notes are available at: - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.9 diff --git a/rpm/generic/spl.spec.in b/rpm/generic/spl.spec.in index 39c6411..4b3a3d7 100644 --- a/rpm/generic/spl.spec.in +++ b/rpm/generic/spl.spec.in @@ -44,6 +44,12 @@ make install DESTDIR=%{?buildroot} %{_mandir}/man5/* %changelog +* Thu Sep 13 2018 Tony Hutter - 0.7.11-1 +- Released 0.7.11-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.11 +* Wed Sep 05 2018 Tony Hutter - 0.7.10-1 +- Released 0.7.10-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.10 * Tue May 08 2018 Tony Hutter - 0.7.9-1 - Released 0.7.9-1, detailed release notes are available at: - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.9 diff --git a/rpm/redhat/Makefile.in b/rpm/redhat/Makefile.in index 39f5ec2..316b63f 100644 --- a/rpm/redhat/Makefile.in +++ b/rpm/redhat/Makefile.in @@ -43,6 +43,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/rpm/redhat/spl.spec.in b/rpm/redhat/spl.spec.in index 39c6411..4b3a3d7 100644 --- a/rpm/redhat/spl.spec.in +++ b/rpm/redhat/spl.spec.in @@ -44,6 +44,12 @@ make install DESTDIR=%{?buildroot} %{_mandir}/man5/* %changelog +* Thu Sep 13 2018 Tony Hutter - 0.7.11-1 +- Released 0.7.11-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.11 +* Wed Sep 05 2018 Tony Hutter - 0.7.10-1 +- Released 0.7.10-1, detailed release notes are available at: +- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.10 * Tue May 08 2018 Tony Hutter - 0.7.9-1 - Released 0.7.9-1, detailed release notes are available at: - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.9 diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 78a0cd7..475539f 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -41,6 +41,7 @@ am__aclocal_m4_deps = $(top_srcdir)/config/kernel-ctl-table-name.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ $(top_srcdir)/config/kernel-group-info.m4 \ $(top_srcdir)/config/kernel-inode-lock.m4 \ + $(top_srcdir)/config/kernel-inode-times.m4 \ $(top_srcdir)/config/kernel-kmem-cache.m4 \ $(top_srcdir)/config/kernel-kuidgid.m4 \ $(top_srcdir)/config/kernel-pde-data.m4 \ diff --git a/spl_config.h.in b/spl_config.h.in index c963e5e..e7243c5 100644 --- a/spl_config.h.in +++ b/spl_config.h.in @@ -57,6 +57,9 @@ /* yes */ #undef HAVE_INODE_LOCK_SHARED +/* inode->i_*time's are timespec64 */ +#undef HAVE_INODE_TIMESPEC64_TIMES + /* truncate_range() inode operation is available */ #undef HAVE_INODE_TRUNCATE_RANGE -- 2.39.2