]> git.proxmox.com Git - mirror_zfs-debian.git/commitdiff
New upstream version 0.7.5
authorAron Xu <happyaron.xu@gmail.com>
Fri, 19 Jan 2018 07:26:44 +0000 (15:26 +0800)
committerAron Xu <happyaron.xu@gmail.com>
Fri, 19 Jan 2018 07:26:44 +0000 (15:26 +0800)
16 files changed:
META
cmd/ztest/ztest.c
configure
etc/systemd/system/50-zfs.preset.in
lib/libzfs/libzfs.pc
lib/libzfs/libzfs_core.pc
module/zfs/spa.c
rpm/generic/zfs-kmod.spec.in
rpm/generic/zfs.spec.in
rpm/redhat/zfs.spec.in
scripts/dkms.mkconf
tests/zfs-tests/tests/functional/mmp/mmp.cfg
tests/zfs-tests/tests/functional/mmp/mmp.kshlib
tests/zfs-tests/tests/functional/mmp/mmp_active_import.ksh
tests/zfs-tests/tests/functional/mmp/mmp_exported_import.ksh
tests/zfs-tests/tests/functional/mmp/mmp_inactive_import.ksh

diff --git a/META b/META
index 3f3d7dc52c8a50288b8d3c5dafa21635774a1386..8bcb520b6479075c38774997cae6c66e00460773 100644 (file)
--- a/META
+++ b/META
@@ -1,7 +1,7 @@
 Meta:         1
 Name:         zfs
 Branch:       1.0
-Version:      0.7.4
+Version:      0.7.5
 Release:      1
 Release-Tags: relext
 License:      CDDL
index 8613d3d63647463bce913d02190be3e7458a2f02..1a320b03a0b5afa4ccb64c27695339b9fe40f666 100644 (file)
@@ -5665,6 +5665,9 @@ ztest_reguid(ztest_ds_t *zd, uint64_t id)
        uint64_t orig, load;
        int error;
 
+       if (ztest_opts.zo_mmp_test)
+               return;
+
        orig = spa_guid(spa);
        load = spa_load_guid(spa);
 
index 3ad40649f9a4d4ece1cd72b264aedb4381937d8b..f4e7983f642433fd01b1ddf6f10c5f4cb0e2e43a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for zfs 0.7.4.
+# Generated by GNU Autoconf 2.63 for zfs 0.7.5.
 #
 # 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='zfs'
 PACKAGE_TARNAME='zfs'
-PACKAGE_VERSION='0.7.4'
-PACKAGE_STRING='zfs 0.7.4'
+PACKAGE_VERSION='0.7.5'
+PACKAGE_STRING='zfs 0.7.5'
 PACKAGE_BUGREPORT=''
 
 # Factoring default headers for most tests.
@@ -1599,7 +1599,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.7.4 to adapt to many kinds of systems.
+\`configure' configures zfs 0.7.5 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1670,7 +1670,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of zfs 0.7.4:";;
+     short | recursive ) echo "Configuration of zfs 0.7.5:";;
    esac
   cat <<\_ACEOF
 
@@ -1804,7 +1804,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-zfs configure 0.7.4
+zfs configure 0.7.5
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1818,7 +1818,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.7.4, which was
+It was created by zfs $as_me 0.7.5, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -2976,7 +2976,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='zfs'
- VERSION='0.7.4'
+ VERSION='0.7.5'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -46174,7 +46174,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 zfs $as_me 0.7.4, which was
+This file was extended by zfs $as_me 0.7.5, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -46237,7 +46237,7 @@ Report bugs to <bug-autoconf@gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-zfs config.status 0.7.4
+zfs config.status 0.7.5
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
index 4d82778e35ba7d60a76cb7c96f4f1465e13461e4..884a69b5b68371849000136d2bea0959d5b0ad66 100644 (file)
@@ -1,6 +1,7 @@
 # ZFS is enabled by default
 enable zfs-import-cache.service
 disable zfs-import-scan.service
+enable zfs-import.target
 enable zfs-mount.service
 enable zfs-share.service
 enable zfs-zed.service
index 3dedae48d3dd08a5c70672e004dea9c9593ea6c3..981c5ae142742ae26c02dfa69b2179e4fb439224 100644 (file)
@@ -5,7 +5,7 @@ includedir=${prefix}/include
 
 Name: libzfs
 Description: LibZFS library
-Version: 0.7.4
+Version: 0.7.5
 URL: http://zfsonlinux.org
 Requires: libzfs_core
 Cflags: -I${includedir}/libzfs -I${includedir}/libspl
index 7606810496474855a3ff125ad25cd1f5f9d93f49..d7e5433f247cdcd44f19ceb778f722f885d8b869 100644 (file)
@@ -5,7 +5,7 @@ includedir=${prefix}/include
 
 Name: libzfs_core
 Description: LibZFS core library
-Version: 0.7.4
+Version: 0.7.5
 URL: http://zfsonlinux.org
 Cflags: -I${includedir}/libzfs -I${includedir}/libspl
 Libs: -L${libdir} -lzfs_core
index 771f4c8d18ae458c280a0e88f118f1c243bc2856..a7a2f628174bf78543c115d8628f4273d28c418b 100644 (file)
@@ -2341,7 +2341,8 @@ vdev_count_verify_zaps(vdev_t *vd)
  * Determine whether the activity check is required.
  */
 static boolean_t
-spa_activity_check_required(spa_t *spa, uberblock_t *ub, nvlist_t *config)
+spa_activity_check_required(spa_t *spa, uberblock_t *ub, nvlist_t *label,
+    nvlist_t *config)
 {
        uint64_t state = 0;
        uint64_t hostid = 0;
@@ -2358,7 +2359,6 @@ spa_activity_check_required(spa_t *spa, uberblock_t *ub, nvlist_t *config)
        }
 
        (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE, &state);
-       (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID, &hostid);
 
        /*
         * Disable the MMP activity check - This is used by zdb which
@@ -2384,8 +2384,12 @@ spa_activity_check_required(spa_t *spa, uberblock_t *ub, nvlist_t *config)
 
        /*
         * Allow the activity check to be skipped when importing the pool
-        * on the same host which last imported it.
+        * on the same host which last imported it.  Since the hostid from
+        * configuration may be stale use the one read from the label.
         */
+       if (nvlist_exists(label, ZPOOL_CONFIG_HOSTID))
+               hostid = fnvlist_lookup_uint64(label, ZPOOL_CONFIG_HOSTID);
+
        if (hostid == spa_get_hostid())
                return (B_FALSE);
 
@@ -2651,7 +2655,7 @@ spa_load_impl(spa_t *spa, uint64_t pool_guid, nvlist_t *config,
         * pool is truly inactive and can be safely imported.  Prevent
         * hosts which don't have a hostid set from importing the pool.
         */
-       activity_check = spa_activity_check_required(spa, ub, config);
+       activity_check = spa_activity_check_required(spa, ub, label, config);
        if (activity_check) {
                if (ub->ub_mmp_magic == MMP_MAGIC && ub->ub_mmp_delay &&
                    spa_get_hostid() == 0) {
index 9d054256f1dc7a91236dbc510895f8ed3b2d3d4d..f4c92b9985749d414836714d2b4aa18de127b430 100644 (file)
@@ -191,6 +191,9 @@ chmod u+x ${RPM_BUILD_ROOT}%{kmodinstdir_prefix}/*/extra/*/*/*
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Mon Dec 18 2017 Tony Hutter <hutter2@llnl.gov> - 0.7.5-1
+- Released 0.7.5-1, detailed release notes are available at:
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.5
 * Thu Dec 07 2017 Tony Hutter <hutter2@llnl.gov> - 0.7.4-1
 - Released 0.7.4-1, detailed release notes are available at:
 - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.4
index be883d5b0db552005cce6fede4af848c1b0b5738..afa45268a36b57a9426ab454cc6902f31fe9fe79 100644 (file)
@@ -220,7 +220,7 @@ image which is ZFS aware.
 %endif
 %if 0%{?_systemd}
     %define systemd --enable-systemd --with-systemdunitdir=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --disable-sysvinit
-    %define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target
+    %define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target zfs-import.target
 %else
     %define systemd --enable-sysvinit --disable-systemd
 %endif
@@ -333,6 +333,9 @@ exit 0
 %endif
 
 %changelog
+* Mon Dec 18 2017 Tony Hutter <hutter2@llnl.gov> - 0.7.5-1
+- Released 0.7.5-1, detailed release notes are available at:
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.5
 * Thu Dec 07 2017 Tony Hutter <hutter2@llnl.gov> - 0.7.4-1
 - Released 0.7.4-1, detailed release notes are available at:
 - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.4
index be883d5b0db552005cce6fede4af848c1b0b5738..afa45268a36b57a9426ab454cc6902f31fe9fe79 100644 (file)
@@ -220,7 +220,7 @@ image which is ZFS aware.
 %endif
 %if 0%{?_systemd}
     %define systemd --enable-systemd --with-systemdunitdir=%{_unitdir} --with-systemdpresetdir=%{_presetdir} --disable-sysvinit
-    %define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target
+    %define systemd_svcs zfs-import-cache.service zfs-import-scan.service zfs-mount.service zfs-share.service zfs-zed.service zfs.target zfs-import.target
 %else
     %define systemd --enable-sysvinit --disable-systemd
 %endif
@@ -333,6 +333,9 @@ exit 0
 %endif
 
 %changelog
+* Mon Dec 18 2017 Tony Hutter <hutter2@llnl.gov> - 0.7.5-1
+- Released 0.7.5-1, detailed release notes are available at:
+- https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.5
 * Thu Dec 07 2017 Tony Hutter <hutter2@llnl.gov> - 0.7.4-1
 - Released 0.7.4-1, detailed release notes are available at:
 - https://github.com/zfsonlinux/zfs/releases/tag/zfs-0.7.4
index ad97f9bca659961ff6c5d82fc4ce25ef9e220904..880510abd386acbe6c78853e821d580b8220c698 100755 (executable)
@@ -30,6 +30,12 @@ PRE_BUILD="configure
   --with-spl=\${source_tree}/spl-\${PACKAGE_VERSION}
   --with-spl-obj=\${dkms_tree}/spl/\${PACKAGE_VERSION}/\${kernelver}/\${arch}
   --with-spl-timeout=300
+  \$(
+    [[ -n \"\${ICP_ROOT}\" ]] && \\
+    {
+      echo --with-qat=\"\${ICP_ROOT}\"
+    }
+  )
   \$(
     [[ -r \${PACKAGE_CONFIG} ]] \\
     && source \${PACKAGE_CONFIG} \\
index 29e030a4301a81a36eba51a48f363e460f7926e6..36f9954435d160dd8344e4c31af6abdffa22e567 100644 (file)
@@ -30,6 +30,8 @@ export TXG_TIMEOUT_DEFAULT=5
 
 export MMP_POOL=mmppool
 export MMP_DIR=$TEST_BASE_DIR/mmp
+export MMP_CACHE=$MMP_DIR/zpool.cache
+export MMP_ZTEST_LOG=$MMP_DIR/ztest.log
 export MMP_HISTORY=100
 export MMP_HISTORY_OFF=0
 
index 43e4f37119a36ae2cdac144a9a08502364224540..4c46ae7a2add991720b5d2841d8d24cf38b05c7f 100644 (file)
@@ -97,21 +97,24 @@ function mmp_pool_create # pool dir
 {
        typeset pool=${1:-$MMP_POOL}
        typeset dir=${2:-$MMP_DIR}
-       typeset opts="-T120 -M -k0 -f $dir -E -p $pool"
+       typeset opts="-VVVVV -T120 -M -k0 -f $dir -E -p $pool"
 
        log_must mkdir -p $dir
+       log_must rm -f $dir/*
        log_must truncate -s $MINVDEVSIZE $dir/vdev1 $dir/vdev2
 
        log_must mmp_clear_hostid
        log_must mmp_set_hostid $HOSTID1
-       log_must zpool create -f $pool mirror $dir/vdev1 $dir/vdev2
+       log_must zpool create -f -o cachefile=$MMP_CACHE $pool \
+           mirror $dir/vdev1 $dir/vdev2
        log_must zpool set multihost=on $pool
+       log_must mv $MMP_CACHE ${MMP_CACHE}.stale
        log_must zpool export $pool
        log_must mmp_clear_hostid
        log_must mmp_set_hostid $HOSTID2
 
        log_note "Starting ztest in the background as hostid $HOSTID1"
-       log_must eval "ZFS_HOSTID=$HOSTID1 ztest $opts >/dev/null 2>&1 &"
+       log_must eval "ZFS_HOSTID=$HOSTID1 ztest $opts >$MMP_ZTEST_LOG 2>&1 &"
 
        while ! is_pool_imported "$pool" "-d $dir"; do
                log_must pgrep ztest
@@ -134,7 +137,7 @@ function mmp_pool_destroy # pool dir
                destroy_pool $pool
         fi
 
-       rm -Rf $dir
+       log_must rm -f $dir/*
        mmp_clear_hostid
 }
 
index e2e30c7eabc97359817d92bbc9b96d939f822c97..035264fe0f4e5a6e9909cbe75910b189412f8aa1 100755 (executable)
@@ -41,7 +41,7 @@ verify_runnable "both"
 
 function cleanup
 {
-       mmp_pool_destroy $MMP_DIR $MMP_POOL
+       mmp_pool_destroy $MMP_POOL $MMP_DIR
        log_must set_tunable64 zfs_multihost_interval $MMP_INTERVAL_DEFAULT
        log_must mmp_clear_hostid
 }
@@ -60,10 +60,17 @@ log_must is_pool_imported $MMP_POOL "-d $MMP_DIR"
 
 # 3. Verify 'zpool import [-f] $MMP_POOL' cannot import the pool.
 MMP_IMPORTED_MSG="Cannot import '$MMP_POOL': pool is imported"
-log_must try_pool_import $MMP_POOL "-d $MMP_DIR" $MMP_IMPORTED_MSG
+
+log_must try_pool_import $MMP_POOL "-d $MMP_DIR" "$MMP_IMPORTED_MSG"
+for i in {1..10}; do
+       log_must try_pool_import $MMP_POOL "-f -d $MMP_DIR" "$MMP_IMPORTED_MSG"
+done
+
+log_must try_pool_import $MMP_POOL "-c ${MMP_CACHE}.stale" "$MMP_IMPORTED_MSG"
+
 for i in {1..10}; do
-       log_must pgrep ztest >/dev/null
-       log_must try_pool_import $MMP_POOL "-f -d $MMP_DIR" $MMP_IMPORTED_MSG
+       log_must try_pool_import $MMP_POOL "-f -c ${MMP_CACHE}.stale" \
+           "$MMP_IMPORTED_MSG"
 done
 
 # 4. Kill ztest to make pool eligible for import.  Poll with 'zpool status'.
@@ -79,21 +86,21 @@ log_must wait_pool_imported $MMP_POOL "-d $MMP_DIR"
 #    - hostid=different - previously imported on a different system
 #
 log_must mmp_clear_hostid
-MMP_IMPORTED_MSG="Set the system hostid"
-log_must check_pool_import $MMP_POOL "-d $MMP_DIR" "action" $MMP_IMPORTED_MSG
+MMP_IMPORTED_MSG="Set a unique system hostid"
+log_must check_pool_import $MMP_POOL "-d $MMP_DIR" "action" "$MMP_IMPORTED_MSG"
 
 log_must mmp_set_hostid $HOSTID1
 MMP_IMPORTED_MSG="The pool can be imported"
-log_must check_pool_import $MMP_POOL "-d $MMP_DIR" "action" $MMP_IMPORTED_MSG
+log_must check_pool_import $MMP_POOL "-d $MMP_DIR" "action" "$MMP_IMPORTED_MSG"
 
 log_must mmp_clear_hostid
 log_must mmp_set_hostid $HOSTID2
 MMP_IMPORTED_MSG="The pool was last accessed by another system."
-log_must check_pool_import $MMP_POOL "-d $MMP_DIR" "status" $MMP_IMPORTED_MSG
+log_must check_pool_import $MMP_POOL "-d $MMP_DIR" "status" "$MMP_IMPORTED_MSG"
 
 # 6. Verify 'zpool import $MMP_POOL' fails with the expected message.
 MMP_IMPORTED_MSG="pool was previously in use from another system."
-log_must try_pool_import $MMP_POOL "-d $MMP_DIR" $MMP_IMPORTED_MSG
+log_must try_pool_import $MMP_POOL "-d $MMP_DIR" "$MMP_IMPORTED_MSG"
 
 # 7. Verify 'zpool import -f $MMP_POOL' can now import the pool.
 log_must import_activity_check $MMP_POOL "-f -d $MMP_DIR"
index 6d34f7e77da408b970c89f99502995ccbd00ea6c..3d67deb02c5f1570c3b2b847b7f611de723c8e07 100755 (executable)
@@ -98,8 +98,8 @@ log_must zpool export $TESTPOOL
 log_must mmp_clear_hostid
 
 for opt in "" "-f"; do
-       MMP_IMPORTED_MSG="Set the system hostid"
-       log_must check_pool_import $TESTPOOL "" "action" $MMP_IMPORTED_MSG
+       MMP_IMPORTED_MSG="Set a unique system hostid"
+       log_must check_pool_import $TESTPOOL "" "action" "$MMP_IMPORTED_MSG"
        log_mustnot import_no_activity_check $TESTPOOL $opt
 done
 
index 78ae5f614aaf2ed22cb52cabeb7da6b3894cd286..c5c66373e0d3b82a28aa8779e18625a03a9018fb 100755 (executable)
@@ -90,8 +90,8 @@ log_must import_activity_check $TESTPOOL "-f"
 # 7. Verify multihost=on and hostid zero fails (no activity check)
 log_must zpool export -F $TESTPOOL
 log_must mmp_clear_hostid
-MMP_IMPORTED_MSG="Set the system hostid"
-log_must check_pool_import $TESTPOOL "-f" "action" $MMP_IMPORTED_MSG
+MMP_IMPORTED_MSG="Set a unique system hostid"
+log_must check_pool_import $TESTPOOL "-f" "action" "$MMP_IMPORTED_MSG"
 log_mustnot import_no_activity_check $TESTPOOL "-f"
 
 log_pass "multihost=on|off inactive pool activity checks passed"